public function init() { parent::init(); if ($this->_superior = SiteModule::findOne(['site_id' => $this->siteId, 'type' => SiteModule::TYPE_MENU, 'position' => $this->position, 'status' => SiteModule::STATUS_ENABLED])) { $this->items = $this->_superior->getItems()->where(['site_id' => $this->siteId, 'status' => SiteModuleItem::STATUS_ENABLED])->orderby('list_order desc, created_at')->all(); } }
public function init() { parent::init(); $this->items = [['title' => $this->homeText, 'url' => \Yii::$app->homeUrl, 'options' => ['class' => 'home']]]; if ($this->headingText) { array_unshift($this->items, ['title' => $this->headingText, 'options' => ['class' => 'heading']]); } if (isset($this->view->params['crumbs']) && is_array($this->view->params['crumbs']) && $this->view->params['crumbs']) { $this->items = array_merge($this->items, $this->view->params['crumbs']); } }
public function init() { parent::init(); if ($this->_superior = SiteModule::findOne(['site_id' => $this->siteId, 'type' => SiteModule::TYPE_BANNER, 'position' => $this->position, 'status' => SiteModule::STATUS_ENABLED])) { $this->items = $this->_superior->getItems()->where(['site_id' => $this->siteId, 'status' => SiteModuleItem::STATUS_ENABLED])->orderby('list_order desc, created_at')->all(); } if ($this->items && $this->carousel) { $this->options['id'] = $this->randomId; $this->view->registerJs("\$('#{$this->randomId}').carousel();", 3); } }