/** * @param int $sectionId * @return SelectBox */ public function create($sectionId) { $selection = $this->pageFacade->all(); $this->pageFilter->filterSection($selection, $sectionId); $selection->select('page.id, page.name'); $selection->order('name'); return new SelectBox('Stránka', $selection->fetchPairs('id', 'name')); }
/** * @param $sectionId * @return \Nette\Database\Table\Selection */ public function section($sectionId) { return $this->pageFilter->filterSection($this->all(), $sectionId); }