在widget里
$control = Yii::app()->getController()->id;
$action = Yii::app()->getController()->getAction()->getId();
在控制器里
获取$name = $this->getId(); // controller
$name = $action->id; // action
在视图里
$name = Yii::app()->controller->id; // controller
$name = $this->getAction()->getId(); // action