set(Breadcrumbs::class, function ($container, $params, $args) { return new Breadcrumbs(ArrayHelper::merge([ 'homeLink' => [ //'label' => '', 'label' => \Yii::t('post', 'Home'), 'encode' => false, 'url' => \Yii::$app->homeUrl, ], ], $args)); }); // Connect frontend modules // Add finish UrlRules $app->getUrlManager()->addRules([ '<_c:[\w\-]+>' => '<_c>/index', '<_c:[\w\-]+>/' => '<_c>/view', '<_c:[\w\-]+>/<_a:[\w-]+>' => '<_c>/<_a>', '<_c:[\w\-]+>//<_a:[\w\-]+>' => '<_c>/<_a>', ]); // Set site theme $theme = isset($app->params['settings']['design']['theme']) ? $app->params['settings']['design']['theme'] : 'start'; $app->view->theme = new Theme([ 'basePath' => '@webroot/themes/' . $theme, 'baseUrl' => '@web/themes/' . $theme, 'pathMap' => [ '@common/modules' => '@webroot/themes/' . $theme . '/modules', '@frontend/views' => '@webroot/themes/' . $theme, '@frontend/widgets' => '@webroot/themes/' . $theme . '/widgets', ], ]); } }