public function init() { if (!$this->controller instanceof AdminModelEditorController) { throw new InvalidParamException(\Yii::t('app', 'This action is designed to work with the controller: ') . AdminModelEditorController::className()); } parent::init(); }
/** * @inheritdoc */ public function init() { parent::init(); if (!$this->controller) { throw new InvalidConfigException("controller - " . \Yii::t('app', "not specified") . "."); } if (!$this->controller instanceof AdminModelEditorController) { throw new InvalidConfigException(\Yii::t('app', "{controller} must be inherited from") . ": " . AdminModelEditorController::className()); } }