beforeAction 示例代码
{Code}
public function beforeAction() { if($this->action->id == 'index') {
//TODO
} }
{BoyLee Said}
这里展示了如何在actionIndex之前设置前置动作. 你也可以使用filter来实现相同的功能.
So I got this code from JianZhang's help, thanks again.
{Code}
public function beforeAction() { if($this->action->id == 'index') {
//TODO
} }
{BoyLee Said}
这里展示了如何在actionIndex之前设置前置动作. 你也可以使用filter来实现相同的功能.
So I got this code from JianZhang's help, thanks again.
YiiLib 专注于: 专业Web开发教程和专业Web开发服务
Copyright © 2011 - 2024 YiiLib.com(YiiBlog.info) - Designed & Developed by Boy.Lee
留言