/** * @inheritdoc */ public function init() { parent::init(); // set the pages module instance if (null === ($this->module = \Yii::$app->getModule(Module::NAME))) { throw new HttpException(404, 'Module "' . Module::NAME . '" not found in ' . __METHOD__); } }