/** * @throws InvalidConfigException */ public function init() { parent::init(); if ($this->enableError && !$this->context->model instanceof Model) { throw new InvalidConfigException('Property "enableError" available only when model is defined.'); } }