public function init()
{
parent::init();
// verify all the components
foreach ($this->requiredComponents as $component) {
if (!Yii::$app->has($component)) {
throw new Exception(sprintf('The required component "%s" is not registered in the configuration file', $component));
}
}
$this->registerTranslations();
}