📜  Yii 1 控制器中的 Action 方法之前 - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:34.693000             🧑  作者: Mango

代码示例1
class UniversityDegreeController extends Controller
{
    protected function beforeAction($action)
    {
        $actionId = $this->getAction()->getId();
        echo $actionId; // 'index' | 'update' | 'delete'
        
        return parent::beforeAction($action);
    }
}