protected function createComponentWallHistoryControl($name) { $c = new WallHistoryControl($this, $name); $data = $group = null; try { $abbr = $this->getParameter("abbr"); $gid = empty($abbr) ? self::ROOT_GROUP : $abbr; if (is_numeric($gid)) { $group = $this->sportGroupService->getSportGroup($gid); } else { $group = $this->sportGroupService->getSportGroupAbbr($gid); } $data = $this->wallService->getOldWallPosts($group); } catch (Exceptions\DataErrorException $ex) { $this->presenter->handleDataLoad(null, ":System:Default:clubRoot", $ex); } $c->setData($data); $c->setParam($gid); return $c; }