/** * @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')); }
/** * @return \Nette\Database\Table\Selection */ public function all() { return $this->pageFilter->filterShow($this->pageFacade->all(), TRUE); }
/** * @param int $id * @return \Nette\Database\Table\Selection */ private function getPage($id) { $context = $this->pageFacade->all(); $this->sectionFilter->filterId($context, $this->sectionId); return $this->pageFilter->filterId($context, $id); }
/** * @return \Nette\Database\Table\Selection */ protected function getModel() { return $this->sectionFilter->filterId($this->pageFacade->all(), $this->sectionId); }