当前位置: 首页>>代码示例>>PHP>>正文


PHP Navigation::addPage方法代码示例

本文整理汇总了PHP中Navigation::addPage方法的典型用法代码示例。如果您正苦于以下问题:PHP Navigation::addPage方法的具体用法?PHP Navigation::addPage怎么用?PHP Navigation::addPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Navigation的用法示例。


在下文中一共展示了Navigation::addPage方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: contextBackend

 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']);
     }
 }
开发者ID:KodiComponents,项目名称:module-pages,代码行数:7,代码来源:ModuleServiceProvider.php

示例2: contextBackend

 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));
         }
     }
 }
开发者ID:KodiComponents,项目名称:module-datasource,代码行数:28,代码来源:ModuleServiceProvider.php

示例3: contextBackend

 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])]);
     }
 }
开发者ID:KodiComponents,项目名称:module-userguide,代码行数:16,代码来源:ModuleServiceProvider.php


注:本文中的Navigation::addPage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。