original_string: public function redirect(array $options = [])
      {
          $plugin     = $this->_request->getParam('plugin');
          $controller = $this->_request->getParam('controller');
  
          $_options = [
              'apply'   => [],
              'savenew' => [
                  'plugin'     => $plugin,
                  'controller' => $controller,
                  'action'     => 'add'
              ],
              'save' => [
                  'plugin'     => $plugin,
                  'controller' => $controller,
                  'action'     => 'index',
              ]
          ];
  
          $options = Hash::merge($_options, $options);
  
          $url = $options['save'];
          if ($rAction = $this->_request->getData('action')) {
              list(, $action) = pluginSplit($rAction);
              $action = Str::low($action);
              if (Arr::key($action, $options)) {
                  $url = $options[$action];
              }
          }
  
          return $this->_controller->redirect($url);
      }
code: public function redirect(array $options = [])
      {
          $plugin     = $this->_request->getParam('plugin');
          $controller = $this->_request->getParam('controller');
  
          $_options = [
              'apply'   => [],
              'savenew' => [
                  'plugin'     => $plugin,
                  'controller' => $controller,
                  'action'     => 'add'
              ],
              'save' => [
                  'plugin'     => $plugin,
                  'controller' => $controller,
                  'action'     => 'index',
              ]
          ];
  
          $options = Hash::merge($_options, $options);
  
          $url = $options['save'];
          if ($rAction = $this->_request->getData('action')) {
              list(, $action) = pluginSplit($rAction);
              $action = Str::low($action);
              if (Arr::key($action, $options)) {
                  $url = $options[$action];
              }
          }
  
          return $this->_controller->redirect($url);
      }
code_tokens: public function redirect ( array $ options = [ ] ) { $ plugin = $ this -> _request -> getParam ( 'plugin' ) ; $ controller = $ this -> _request -> getParam ( 'controller' ) ; $ _options = [ 'apply' => [ ] , 'savenew' => [ 'plugin' => $ plugin , 'controller' => $ controller , 'action' => 'add' ] , 'save' => [ 'plugin' => $ plugin , 'controller' => $ controller , 'action' => 'index' , ] ] ; $ options = Hash :: merge ( $ _options , $ options ) ; $ url = $ options [ 'save' ] ; if ( $ rAction = $ this -> _request -> getData ( 'action' ) ) { list ( , $ action ) = pluginSplit ( $ rAction ) ; $ action = Str :: low ( $ action ) ; if ( Arr :: key ( $ action , $ options ) ) { $ url = $ options [ $ action ] ; } } return $ this -> _controller -> redirect ( $ url ) ; }
docstring: Redirect by request data.
  
  @param   array $options
  @return  \Cake\Http\Response|null
docstring_tokens: Redirect by request data .