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]]; } }