public function up()
 {
     $shop = \app\backend\models\BackendMenu::findOne(['name' => 'Shop']);
     if (!is_null($shop)) {
         $item = new \app\backend\models\BackendMenu();
         $item->attributes = ['parent_id' => $shop->id, 'name' => 'Categories groups', 'route' => 'backend/category-group/index', 'icon' => 'tag', 'sort_order' => 0, 'added_by_ext' => 'core', 'rbac_check' => 'category manage', 'css_class' => '', 'translation_category' => 'shop'];
         $item->save();
     }
 }
Example #2
0
echo Yii::$app->user->identity->gravatar();
?>
" alt="me" class="online" />
                        <span>
                            <?php 
echo Yii::$app->user->identity->username;
?>
                        </span>
                        <i class="fa fa-angle-down"></i>
                    </a> 
                    
                </span>
            </div>
            <nav>
                <?php 
echo app\backend\widgets\Menu::widget(['items' => app\backend\models\BackendMenu::getAllMenu()]);
?>
            </nav>
            <span class="minifyme" data-action="minifyMenu"> 
                <i class="fa fa-arrow-circle-left hit"></i> 
            </span>
        </aside>
    <div id="main" role="main">
        <div id="ribbon">
            <?php 
echo Breadcrumbs::widget(['homeLink' => ['label' => Yii::t('app', 'Dashboard'), 'url' => Url::to(['/backend'])], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>
        </div>
        <div id="content">
            <?php 
echo \app\widgets\Alert::widget();
 public function up()
 {
     $slider_item = new \app\backend\models\BackendMenu();
     $slider_item->attributes = ['parent_id' => '1', 'name' => 'Sliders', 'route' => 'backend/slider/index', 'icon' => 'arrows-h', 'sort_order' => '10', 'added_by_ext' => 'core', 'rbac_check' => 'content manage', 'css_class' => '', 'translation_category' => 'app'];
     $slider_item->save();
 }
 public function up()
 {
     $item = new \app\backend\models\BackendMenu();
     $item->attributes = ['parent_id' => 1, 'name' => 'Rating groups', 'route' => 'backend/rating/index', 'icon' => 'star-half-o', 'sort_order' => 6, 'added_by_ext' => 'core', 'rbac_check' => 'review manage', 'css_class' => '', 'translation_category' => 'app'];
     $item->save();
 }