Example #1
0
 /**
  * @inheritdoc
  */
 public function run()
 {
     $items = MenuItem::find()->where(['menu_id' => 1, 'status' => MenuItem::STATUS_ACTIVE])->with(['icon', 'activeIcon', 'video'])->all();
     if ($items) {
         $items = TreeHelper::buildNodesTree($items);
     }
     return $this->render('menu/menu', ['widget' => $this, 'items' => $items]);
 }
Example #2
0
 /**
  * @inheritdoc
  */
 public function run()
 {
     $items = MenuItem::find()->where(['menu_id' => 1, 'status' => MenuItem::STATUS_ACTIVE])->all();
     $items = TreeHelper::buildNodesTree($items);
     return $this->render('menu/menu', ['widget' => $this, 'items' => $items, 'level' => 1]);
 }