Posts Tagged “controller”

Get Name of Current Controller and Action in Yii

By | December 5, 2011

This is a simple one line piece of code to retrieve the name of the current controller, which is great for making more generic and useful code. $controllerName = Yii::app()->controller->id;

Read more »