/**
  * @param int $sectionId
  * @return Tree
  */
 public function create($sectionId)
 {
     $context = $this->menuFacade->all()->select('menu.*, typ.name AS type_name, :menu_has_menu.parent.id AS parentId');
     $this->menuOrderer->order($context, 'menu');
     $this->sectionFilter->filterId($context, $sectionId);
     return new Tree($context);
 }
 /**
  * @param int $id
  * @return array
  */
 public function getOptionsBySection($id)
 {
     $context = $this->submoduleFacade->all();
     $this->sectionFilter->filterId($context, $id, ':module_has_submodule.module', ':');
     return $context->order('name')->fetchPairs('code', 'name');
 }