public function contextBackend() { $root = \Navigation::addPage(['id' => 'pages', 'title' => 'pages::core.title.pages.list', 'url' => route('backend.page.list'), 'permissions' => 'page::list', 'priority' => 100, 'icon' => 'sitemap']); if ($page = \Navigation::getPages()->findById('design')) { $page->addPage(['id' => 'layouts', 'title' => 'pages::core.title.layouts.list', 'url' => route('backend.layout.list'), 'permissions' => 'layout::list', 'priority' => 100, 'icon' => 'desktop']); } }
public function contextBackend() { $datasourcePage = \Navigation::addPage(['id' => 'datasource', 'title' => 'datasource::core.title.section', 'priority' => 500, 'icon' => 'tasks']); $sections = app('datasource.manager')->getRootSections(); foreach ($sections as $dsSection) { $page = new Section($dsSection); if ($dsSection->getSetting('show_in_root_menu')) { \Navigation::addPage($page); } else { $datasourcePage->addPage($page); } } $folders = SectionFolder::with('sections')->get(); foreach ($folders as $folder) { if (count($folder->sections) > 0) { $folderPage = $datasourcePage->addPage(new Folder($folder)); foreach ($folder->sections as $dsSection) { $folderPage->addPage(new Section($dsSection)); } } } if (count($types = app('datasource.manager')->getAvailableTypes()) > 0) { $create = $datasourcePage->addPage(['title' => 'datasource::core.button.create', 'icon' => 'plus', 'id' => 'datasource-create']); foreach ($types as $type => $object) { $create->addPage(new SectionType($object)); } } }
public function contextBackend() { $navigation = \Navigation::addPage(['id' => 'documentation', 'icon' => 'book', 'title' => 'userguide::core.title', 'priority' => 9999]); $modules = array_reverse(config('userguide.modules')); // Remove modules that have been disabled via config foreach ($modules as $key => $value) { if (!config('userguide.modules.' . $key . '.enabled')) { continue; } $title = config('userguide.modules.' . $key . '.name'); if (empty($title)) { $title = $key; } $navigation->addPage(['id' => $key, 'icon' => 'leanpub', 'title' => $title, 'url' => route('backend.userguide.docs', [$key])]); } }