/**
  * @param \App\type $id
  * @return \App\PresenterLinkSettings
  */
 public function create($id)
 {
     $item = $this->menuItemDataSource->get($id, function (Selection $context) {
         $pageKey = ':menu_has_rubric.rubric.id';
         $context->select('section.module, menu.section_id, menu.name');
         $context->select("{$pageKey}");
         $context->where("{$pageKey} IS NOT NULL");
     });
     return $this->presenterLinkSettingsFactory->create("Article:rubric", ['id' => $item->id, 'slug' => \Nette\Utils\Strings::webalize($item->name)]);
 }
 /**
  * @param \App\type $id
  * @return \App\ILinkSettings
  */
 public function create($id)
 {
     $item = $this->menuItemDataSource->get($id, function (Selection $context) {
         $symlinkTable = ':menu_has_symlink.symlink';
         $context->select("{$symlinkTable}.id, {$symlinkTable}.type");
         $context->where("{$symlinkTable}.type != ?", MenuTypeConst::SYMLINK);
         $context->where("{$symlinkTable}.id IS NOT NULL");
     });
     return $this->menuLinkMap->get($item['type'])->create($item['id']);
 }
 /**
  * @param \App\type $id
  * @return \App\PresenterLinkSettings
  */
 public function create($id)
 {
     $item = $this->menuItemDataSource->get($id, function (Selection $context) {
         $pageKey = ':menu_has_page.page.id';
         $context->select('section.module, menu.section_id, menu.name');
         $context->select("{$pageKey}");
         $context->where("{$pageKey} IS NOT NULL");
     });
     $module = Strings::capitalize($item->module);
     return $this->presenterLinkSettingsFactory->create(":{$module}:Page:default", ['id' => $item->id]);
 }
 /**
  * @param \App\type $id
  * @return \App\PresenterLinkSettings
  */
 public function create($id)
 {
     $item = $this->menuItemDataSource->get($id, function (Selection $context) {
         $pageKey = ':menu_has_presenter.presenter.code';
         $context->select('section.module, menu.section_id, menu.name');
         $context->select("{$pageKey}");
         $context->where("{$pageKey} IS NOT NULL");
     });
     $module = Strings::capitalize($item->module);
     $presenter = Strings::firstUpper($item->code);
     return $this->presenterLinkSettingsFactory->create(":{$module}:{$presenter}:", []);
 }
 /**
  * @param \App\type $id
  * @return \App\PresenterLinkSettings
  */
 public function create($id)
 {
     $item = $this->menuItemDataSource->get($id, 'section.module, section_id, :menu_has_submodule.submodule');
     return $this->presenterLinkSettingsFactory->create(":{$item->module}:{$item->submodule}:Homepage:", ['section' => $item->section_id]);
 }
 /**
  * @param \App\type $id
  * @return \App\UrlLinkSettings
  */
 public function create($id)
 {
     return new UrlLinkSettings($this->menuItemDataSource->get($id, 'url')->url);
 }
 /**
  * @param \App\type $id
  * @return \App\PresenterLinkSettings
  */
 public function create($id)
 {
     $item = $this->menuItemDataSource->get($id, ':menu_has_section.section.id');
     return $this->presenterLinkSettingsFactory->create(':Home:Dashboard:Homepage:', ['section' => $item->id]);
 }