예제 #1
0
 /**
  * Get the action for an "action" option.
  *
  * @param  array|string  $options
  * @return string
  */
 protected function getControllerAction($options)
 {
     if (is_array($options)) {
         return $this->url->action($options[0], array_slice($options, 1));
     }
     return $this->url->action($options);
 }
예제 #2
0
 /**
  * Create a new redirect response.
  *
  * @param  string  $path
  * @param  int     $status
  * @param  array   $headers
  * @return \Nova\Http\RedirectResponse
  */
 protected function createRedirect($path, $status, $headers)
 {
     $redirect = new RedirectResponse($path, $status, $headers);
     if (isset($this->session)) {
         $redirect->setSession($this->session);
     }
     $redirect->setRequest($this->generator->getRequest());
     return $redirect;
 }
예제 #3
0
 /**
  * Generate a HTML link to a controller action.
  *
  * @param  string  $action
  * @param  string  $title
  * @param  array   $parameters
  * @param  array   $attributes
  * @return string
  */
 public function linkAction($action, $title = null, $parameters = array(), $attributes = array())
 {
     return $this->link($this->url->action($action, $parameters), $title, $attributes);
 }