Beispiel #1
0
 /**
  * Creates an HTML link which is generated from given $url and current request query params.
  *
  * @param string $title The content to be wrapped by <a> tags.
  * @param string|array $url Cake-relative URL or array of URL parameters, or external URL (starts with http://)
  * @param array $options Array of options and HTML attributes.
  * @param string $confirmMessage JavaScript confirmation message. This
  *   argument is deprecated as of 2.6. Use `confirm` key in $options instead.
  * @return string An `<a />` element.
  */
 public function pasLink($title, $url = null, $options = array(), $confirmMessage = false)
 {
     $url = Pas::parse($this->request, $url);
     return $this->link($title, $url, $options, $confirmMessage);
 }
Beispiel #2
0
 /**
  * Redirects to URL which is generated from given $url and current request query params, after turning off $this->autoRender.
  * Script execution is halted after the redirect.
  *
  * @param string|array $url A string or array-based URL pointing to another location within the app,
  *     or an absolute URL
  * @param int|array|null $status HTTP status code (eg: 301). Defaults to 302 when null is passed.
  * @param bool $exit If true, exit() will be called after the redirect
  * @return \Cake\Network\Response|null
  */
 public function pasRedirect($url = null, $status = null, $exit = true)
 {
     $url = Pas::parse($this->controller->request, $url);
     $this->controller->redirect($url, $status, $exit);
 }