/** * Execute the controller. * * @return mixed Return executed result. * * @throws \LogicException * @throws \RuntimeException */ public function execute() { $model = new BlogsModel(); $view = new WidgetHtmlView(); $model['user.id'] = User::get()->id; $view['blog'] = Blog::get(); $view['blogs'] = $model->getItems(); $view['activeMenu'] = $this->input->get('activeMenu', 'dashboard'); return $view->setLayout('sidebar')->render(); }
/** * doExecute * * @return boolean */ protected function doExecute() { $model = new BlogsModel(); $view = new BlogsHtmlView($this->data); $model['user.id'] = User::get()->id; // $model['list.start'] = $this->input->getInt('start'); $model['list.limit'] = 100; $model['list.search'] = $this->input->getString('q'); $cats = $model->getItems(); $view['items'] = $cats; return $view->render(); }
/** * Execute the controller. * * @return mixed Return executed result. * * @throws \LogicException * @throws \RuntimeException */ public function execute() { $model = new BlogsModel(); $model['user.id'] = User::get()->id; $data['activeMenu'] = $this->input->get('activeMenu', 'none'); $data['hideMenu'] = $this->input->get('hideMenu', 0); $data['widget'] = new Data(); // $data['widget']['sidebar'] = (new SidebarController($this->input, $this->app))->execute(); $data['blog'] = Blog::get(); $data['blogs'] = $model->getItems(); $data['user'] = User::get(); $data['profiler'] = WINDWALKER_DEBUG ? Ioc::getProfiler() : null; $this->data = $data; return $this->doExecute(); }