handle(); $this->seo->prependTitle('帮助'); $this->view->setVar('items', $items); } /** * @Get("/{id:[0-9]+}", name="home.help.show") */ public function showAction($id) { $service = new HelpInfoService(); $help = $service->handle($id); if ($help['deleted'] == 1) { $this->notFound(); } if ($help['published'] == 0) { $this->notFound(); } $featuredCourses = $this->getFeaturedCourses(); $this->seo->prependTitle(['帮助', $help['title']]); $this->view->setVar('help', $help); $this->view->setVar('featured_courses', $featuredCourses); } protected function getFeaturedCourses() { $service = new IndexService(); return $service->getSimpleFeaturedCourses(); } }