Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Before Action methoond in Yii 1 controller

class UniversityDegreeController extends Controller
{
    protected function beforeAction($action)
    {
        $actionId = $this->getAction()->getId();
        echo $actionId; // 'index' | 'update' | 'delete'
        
        return parent::beforeAction($action);
    }
}
Source by gist.github.com #
 
PREVIOUS NEXT
Tagged: #Before #Action #methoond #Yii #controller
ADD COMMENT
Topic
Name
6+7 =