本文整理汇总了PHP中MainController::executeBefore方法的典型用法代码示例。如果您正苦于以下问题:PHP MainController::executeBefore方法的具体用法?PHP MainController::executeBefore怎么用?PHP MainController::executeBefore使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MainController
的用法示例。
在下文中一共展示了MainController::executeBefore方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeBefore
public function executeBefore()
{
switch ($this->_action) {
case 'new':
$this->addJS('sha1', 'new-user');
break;
}
parent::executeBefore();
}
示例2: executeBefore
protected function executeBefore()
{
switch ($this->_action) {
case 'view':
$this->addTitle($this->_model->getTitle());
$this->addCSS('view_message');
break;
}
parent::executeBefore();
}
示例3: executeBefore
protected function executeBefore()
{
$this->addTitle('Forum');
switch ($this->_action) {
case 'open':
$this->addTitle($this->_model->getName());
$this->addCSS('open_forum');
break;
case 'create':
$this->addTitle('add');
$this->addCSS('create_forum');
$this->addJS('create_forum');
break;
case 'restrict':
case 'close':
case 'free':
$this->_show_view = false;
break;
}
parent::executeBefore();
}