handle(); $this->view->setRenderLevel(View::LEVEL_ACTION_VIEW); $this->view->pick('widget/my_tags'); $this->view->setVar('tags', $pager->items); } /** * @Get("/featured/courses", name="home.widget.featured_courses") */ public function featuredCoursesAction() { $cache = new FeaturedCourseListCache(); $courses = $cache->get(); $this->view->setRenderLevel(View::LEVEL_ACTION_VIEW); $this->view->pick('widget/featured_courses'); $this->view->setVar('courses', $courses); } /** * @Get("/featured/articles", name="home.widget.featured_articles") */ public function featuredArticlesAction() { $cache = new FeaturedArticleListCache(); $articles = $cache->get(); $this->view->setRenderLevel(View::LEVEL_ACTION_VIEW); $this->view->pick('widget/featured_articles'); $this->view->setVar('articles', $articles); } /** * @Get("/hot/questions", name="home.widget.hot_questions") */ public function hotQuestionsAction() { $service = new HotQuestionListService(); $questions = $service->handle(); $this->view->setRenderLevel(View::LEVEL_ACTION_VIEW); $this->view->pick('widget/hot_questions'); $this->view->setVar('questions', $questions); } /** * @Get("/top/authors", name="home.widget.top_authors") */ public function topAuthorsAction() { $service = new TopAuthorListService(); $authors = $service->handle(); $this->view->setRenderLevel(View::LEVEL_ACTION_VIEW); $this->view->pick('widget/top_authors'); $this->view->setVar('authors', $authors); } /** * @Get("/top/answerers", name="home.widget.top_answerers") */ public function topAnswerersAction() { $service = new TopAnswererListService(); $answerers = $service->handle(); $this->view->setRenderLevel(View::LEVEL_ACTION_VIEW); $this->view->pick('widget/top_answerers'); $this->view->setVar('answerers', $answerers); } }