Yii里获取当前controller和action的id
2013-07-29 11:02
645 查看
Yii里获取当前controller和action的id
在控制器里
$name = $this->getId(); // controller
$name = $action->id; // action
在视图里
$name = $this->id = Yii::app()->controller->id; // controller
$name = $this->action->id = $this->getAction()->getId(); // action
在控制器里
$name = $this->getId(); // controller
$name = $action->id; // action
在视图里
$name = $this->id = Yii::app()->controller->id; // controller
$name = $this->action->id = $this->getAction()->getId(); // action
相关文章推荐
- Yii里获取当前module controller action的id
- Yii中获取当前controller和action的id
- Yii 中如何获取当前controller名称和controller内部action方法Id
- Yii里获取当前controller和action的id
- Yii框架获取当前controlle和action对应id的方法
- php yii 小计:获取module controller action id
- Yii框架获取当前controlle和action对应id的方法
- 在ASP.NET MVC 中获取当前URL、controller、action
- 获取当前URL、controller、action
- Yii2使用$this->context获取当前的Module、Controller(控制器)、Action等
- 在ASP.NET MVC 中获取当前URL、controller、action
- 在ASP.NET MVC 中获取当前URL、controller、action(转)
- 在ASP.NET MVC 中获取当前URL、controller、action
- 在ASP.NET MVC 中获取当前URL、controller、action
- MVC中如何获取当前action、controller
- MVC获取当前Controller/Action名称
- 在ASP.NET MVC 中获取当前URL、controller、action
- 在ASP.NET MVC 中获取当前URL、controller、action
- Yii2使用$this->context获取当前的Module、Controller(控制器)、Action等
- 在ASP.NET MVC 中获取当前URL、controller、action