本文整理匯總了PHP中app\Page::before方法的典型用法代碼示例。如果您正苦於以下問題:PHP Page::before方法的具體用法?PHP Page::before怎麽用?PHP Page::before使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app\Page
的用法示例。
在下文中一共展示了Page::before方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: before
public function before()
{
parent::before();
if (!$this->execute) {
return;
}
}
示例2: before
/**
* require auth
*/
public function before()
{
$this->secure();
if (is_null($this->getUser())) {
$this->redirect('/user/login?return_url=' . rawurlencode($this->request->server('REQUEST_URI')));
}
parent::before();
}
示例3: before
/**
* require auth
*/
public function before()
{
if (is_null($this->pixie->auth->user())) {
$this->redirect('/user/login?return_url=' . rawurlencode($this->request->server('REQUEST_URI')));
}
parent::before();
if (!$this->execute) {
return;
}
$this->useRest = $this->pixie->getParameter('parameters.rest_in_profile', false);
$this->view->useRest = $this->useRest;
}
示例4: before
public function before()
{
$this->secure();
parent::before();
}
示例5: before
public function before()
{
parent::before();
$this->view->host = $this->request->getSiteUrl();
}
示例6: before
/**
* require auth
*/
public function before()
{
parent::before();
}