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