$this->module->id; #模块名
$this->action->id; #方法名
$this->uniqueId; #控制器名称
Yii: 获取当前模块名、控制器名 、动作名
![Created](http://www.kuitao8.com/images/images/history.png)
![Views Views](http://www.kuitao8.com/images/images/view.gif)
![Author Author](http://www.kuitao8.com/images/images/author.png)
1. 获取控制器名
在控制器中获取控制器名:
$name = $this->getId();
在视图中获取控制器名:
$name = Yii::app()->controller->id;
2. 获取动作名
在控制器beforeAction()回调函数中获取动作名:
$name = $action->id;
在其他地方获取动作名:
$name = $this->getAction()->getId();
3、视图中获取当前模块ID
$this->module->id,
http://www.kuitao8.com/20140425/2333.shtml