예제 #1
0
 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();
 }
예제 #2
0
 /**
  * @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());
     }
 }