Codxplore.com

Latest news: New android application Islamic Video has been released. its a free islamic video application for android smartphone. Download now!


Answer

In a layout you can access the current controller via $this->context, and so the current action id by $this->context->action->id

For reference http://stackoverflow.com/questions/28769719/yii2-get-current-action-id-in-main-php

Tags : PHP, Yii2,

Views : 2431

Subscribe Us


Follow Us