/** * Action for displaying list of Articles within given group. * @param string $abbr */ public function actionDefault($abbr = self::ROOT_GROUP) { $data = null; $sg = null; try { if (is_string($abbr)) { $sg = $this->sportGroupService->getSportGroupAbbr($abbr); } elseif (is_numeric($abbr)) { $sg = $this->sportGroupService->getSportGroup($abbr); } $data = $this->articleService->getArticles($sg); } catch (Exceptions\DataErrorException $ex) { $this->handleDataLoad($abbr, ":System:Homepage:default", $ex); } $this->template->data = $data; $this->template->abbr = $abbr; }
public function renderDefault() { $this->template->articles = $this->articleService->getArticles(); $this->template->highlights = $this->articleService->getHighLights(); }