How to get current controller name and action name in Yii
$controller=Yii::app()->controller; $action=$controller->action; //Getting the current action echo $action->id; //Getting the current controller $controller->uniqueID
$controller=Yii::app()->controller; $action=$controller->action; //Getting the current action echo $action->id; //Getting the current controller $controller->uniqueID