/**
  * @param int $pageId
  * @return array
  */
 function getPageSection($pageId)
 {
     $context = $this->sectionFacade->all();
     $this->pageFilter->filterId($context, $pageId, ':page_has_section');
     return $context->fetchPairs('id', 'id');
 }
 /**
  * @param $id
  * @return \Nette\Database\Table\Selection
  */
 public function page($id)
 {
     return $this->pageFilter->filterId($this->all(), $id);
 }
 /**
  * @param int $id
  * @param int[] $ids
  */
 public function setSection($id, $ids)
 {
     $currentIds = $this->pageFilter->filterId($this->all(), $id)->select(':page_has_section.section.id')->fetchPairs('id', 'id');
     $this->pageRepository->reassignSection($id, $ids, $currentIds);
 }