/**
  * @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'));
 }
예제 #2
0
 /**
  * @return \Nette\Database\Table\Selection
  */
 public function all()
 {
     return $this->pageFilter->filterShow($this->pageFacade->all(), TRUE);
 }
예제 #3
0
 /**
  * @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);
 }
예제 #4
0
 /**
  * @return \Nette\Database\Table\Selection
  */
 protected function getModel()
 {
     return $this->sectionFilter->filterId($this->pageFacade->all(), $this->sectionId);
 }