Codxplore.com

Latest news:

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

Yii2 - Get Current Action ID in main.php


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 : 2850

Subscribe Us


Follow Us