<?php use app\assets_b\AppAsset; use app\core\admpages\models\Page; use yii\bootstrap\Nav; use yii\bootstrap\NavBar; use yii\helpers\Html; use app\helpers\Url; use yii\widgets\Breadcrumbs; /* @var $this \yii\web\View */ /* @var $content string */ $appAsset = AppAsset::register($this); /* @var $i18n \pavlinter\translation\I18N */ $i18n = Yii::$app->getI18n(); \app\modules\admunderconst\Module::loadUnderConstruction($this); $menus = Page::find()->with(['translations', 'childs' => function ($q) { $q->andWhere(['active' => 1, 'visible' => 1]); }])->where(['id_parent' => [1, 2, 3], 'active' => 1, 'visible' => 1])->orderBy(['weight' => SORT_ASC])->all(); $Menu1 = []; $Menu2 = []; $Menu3 = []; $baseUrl = Url::getLangUrl(); foreach ($menus as $menu) { $item = []; $item['label'] = $menu->name; if ($menu->type === 'main') { $item['url'] = $baseUrl; } else { $item['url'] = $menu->url(); } if ($menu->childs) {