getUrlManager()->addRules([ 'forms/manage/form/view/' => 'forms/manage/form/view', ]); // add languages $app->getI18n()->translations = ArrayHelper::merge($app->getI18n()->translations, [ 'form' => [ 'class' => 'yii\i18n\PhpMessageSource', 'basePath' => '@common/modules/forms/messages', ], ]); // add menu items if (basename($app->getBasePath()) === 'backend') { $app->params['adminMenu'][] = [ 'label' => \Yii::t( 'form', 'Forms' ), 'icon' => 'address-card-o', 'items' => [ [ 'label' => \Yii::t( 'form', 'Forms' ), 'icon' => 'caret-right', 'url' => [ '/forms/manage/form/index' ] ], [ 'label' => \Yii::t( 'form', 'Messages' ), 'icon' => 'caret-right', 'url' => [ '/forms/manage/form-message/index' ] ], ], 'visible' => \Yii::$app->user->can( 'admin' ) || \Yii::$app->user->can( 'FormsManagement' ), ]; } } }