コード例 #1
0
ファイル: MainMenu.php プロジェクト: AsterAI-corp/category
 public function __construct($config = array())
 {
     parent::__construct($config);
     $categories = Category::find()->all();
     foreach ($categories as $category) {
         $this->items[] = ['label' => $category->caption, 'url' => ['/product/category/' . $category->machine_name]];
     }
 }