Exemplo n.º 1
0
 protected function launch()
 {
     if ($this->category && !$this->category instanceof Category) {
         $this->category = Category::findOne(intval($this->category));
     }
     echo $this->render($this->layout, ['dataProvider' => new ActiveDataProvider(['query' => $this->category ? $this->category->children()->published()->orderBy(null) : Category::find()->roots()->published(), 'pagination' => false, 'sort' => ['defaultOrder' => [$this->sort => intval($this->dir)]]]), 'itemLayout' => $this->itemLayout]);
 }