本文整理汇总了PHP中Navigation::getPages方法的典型用法代码示例。如果您正苦于以下问题:PHP Navigation::getPages方法的具体用法?PHP Navigation::getPages怎么用?PHP Navigation::getPages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Navigation
的用法示例。
在下文中一共展示了Navigation::getPages方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: contextBackend
public function contextBackend()
{
$this->registerGatePermissions();
$this->extendBladeTags();
$navigation = \Navigation::getPages()->findById('system');
$navigation->setFromArray([['id' => 'users', 'title' => 'users::core.title.list', 'url' => route('backend.user.list'), 'permissions' => 'user::list', 'priority' => 200, 'icon' => 'user'], ['id' => 'roles', 'title' => 'users::role.title.list', 'url' => route('backend.role.list'), 'permissions' => 'role::list', 'priority' => 300, 'icon' => 'group']]);
}
示例2: 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']);
}
}
示例3: contextBackend
public function contextBackend()
{
if ($navigation = \Navigation::getPages()->findById('design')) {
$navigation->setFromArray([['id' => 'snippets', 'title' => 'widgets::snippet.title.list', 'url' => route('backend.snippet.list'), 'permissions' => 'snippet::list', 'priority' => 200, 'icon' => 'cutlery'], ['id' => 'widgets', 'title' => 'widgets::core.title.list', 'url' => route('backend.widget.list'), 'permissions' => 'widget::list', 'priority' => 300, 'icon' => 'cubes']]);
}
}