public function init() { foreach (NavItem::fromModule('gallery') as $item) { $this->_dropdown[] = ['value' => $item->id, 'label' => $item->title]; } foreach (Album::find()->asArray()->all() as $item) { $this->_alben[] = ['value' => $item['id'], 'label' => $item['title']]; } }
public function init() { foreach (NavItem::fromModule('news') as $item) { $this->_dropdown[] = ['value' => $item->id, 'label' => $item->title]; } }