本文整理汇总了PHP中Navigation::links方法的典型用法代码示例。如果您正苦于以下问题:PHP Navigation::links方法的具体用法?PHP Navigation::links怎么用?PHP Navigation::links使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Navigation
的用法示例。
在下文中一共展示了Navigation::links方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sidebar
/**
* sidebar function
* Create sidebar
* @return string
* @author joharijumali
**/
public static function sidebar()
{
$Menu = Admin_Menu::menuGenerator();
$Menu = Admin_Nav::navigationdata();
$navValue = array();
foreach ($Menu as $floor => $packet) {
array_push($navValue, array(Navigation::HEADER, Str::upper($packet['header'])));
if (!empty($packet['parent'])) {
foreach ($packet['parent'] as $key => $action) {
array_push($navValue, array(Str::title($action['alias']), url($action['path']), $action['path'] == URI::segment(2) . '/' . URI::segment(3) ? true : false, false, null, 'edit'));
}
}
array_push($navValue, array(Navigation::DIVIDER));
}
$final = Navigation::lists(Navigation::links($navValue));
return $final;
}
示例2: sidebar
/**
* sidebar function
* Create sidebar
* @return string
* @author joharijumali
**/
public static function sidebar()
{
$Menu = Console_Header::navigationdata();
$navValue = array();
array_push($navValue, array(Str::title('dashboard'), url('home/dashboard'), false, false, null, 'tasks'));
array_push($navValue, array(Navigation::DIVIDER));
foreach ($Menu as $floor => $packet) {
array_push($navValue, array(Navigation::HEADER, Str::upper($packet['header'])));
if (!empty($packet['parent'])) {
foreach ($packet['parent'] as $key => $action) {
array_push($navValue, array(Str::title($action['alias']), url($action['path']), $action['path'] == URI::segment(2) . '/' . URI::segment(3) ? true : false, false, null, 'play'));
}
}
array_push($navValue, array(Navigation::DIVIDER));
}
$final = Navigation::lists(Navigation::links($navValue));
return $final;
}
示例3: render
public static function render()
{
$rolelist = Admin_UserRole::all();
$page = Acltree::datasource();
//all();
$acl = Admin_UserAcl::aclRegistered();
$content = array();
$fot = 1;
foreach ($rolelist as $role) {
$subcontent = '<h3>' . Str::upper($role->role . " Setup") . '</h3>';
$subcontent .= '<ul class="nav nav-list">';
foreach ($page as $controller => $selection) {
$subcontent .= '<li class="nav-header"><i class="icon-hdd"></i> ' . Str::upper($selection['alias']) . '</li>';
$subcontent .= '<div class="row-fluid">';
foreach ($selection['page'] as $action => $alias) {
$subcontent .= '<span style="padding-right:5px;width:auto;">';
$subcontent .= Form::hidden($role->role . '[id]', $role->roleid);
if (in_array($role->roleid, array_keys($acl)) && in_array($controller, array_keys($acl[$role->roleid])) && in_array($action, array_keys($acl[$role->roleid][$controller])) && $acl[$role->roleid][$controller][$action] == true) {
$subcontent .= Form::inline_labelled_checkbox($role->role . '[' . $controller . '][' . $action . ']', Str::title($alias), null, array('checked' => true, 'style' => 'padding:2px'));
} else {
$subcontent .= Form::inline_labelled_checkbox($role->role . '[' . $controller . '][' . $action . ']', $alias);
}
$subcontent .= '</span>';
}
$subcontent .= '</div >';
$subcontent .= '<li class="divider"></li>';
}
$subcontent .= '</ul>';
$active = $fot == 1 ? true : false;
$fot++;
array_push($content, array(Str::upper($role->role), $subcontent, $active));
}
$nav = Navigation::links($content);
$tab = Tabbable::tabs_left($nav);
return $tab;
}
示例4: asset
<?php
$navbar = [['title' => 'Events', 'link' => URL::route('events.index')], ['title' => 'Users', 'link' => URL::route('users.index')], ['title' => 'Games', 'link' => URL::route('application-usage.index')], ['Info', $info], ['Extras', [['title' => 'Live Dashboard', 'link' => URL::route('dashboard.index')], ['title' => 'Achievements', 'link' => URL::route('achievements.index')], ['title' => 'User Achievements', 'link' => URL::route('user-achievements.index')], ['title' => 'LANs', 'link' => URL::route('lans.index')], ['title' => 'Roles', 'link' => URL::route('roles.index')], ['title' => 'User Roles', 'link' => URL::route('user-roles.index')], ['title' => 'Event Types', 'link' => URL::route('event-types.index')]]], ['Links', $links]];
echo Navbar::create(Navbar::NAVBAR_TOP)->withBrand('<img src="' . asset('img/logo.png') . '" width="82" height="29" alt="LANager Logo">')->withContent(Navigation::links($navbar))->withContent(View::make('layouts/default/auth'));
示例5:
<html>
<head>
<title>Notes to Myself - @yield('title')</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
@yield('header')
</head>
<body>
<?php
echo Navbar::withBrand('SuperNotes!', '/')->withContent(Navigation::links([['link' => '\\contact', 'title' => Icon::create('envelope') . ' Contact Me!']])->right());
?>
<div class="container">
@if (count($errors) > 0)
<div class="alert alert-danger">
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
@if(Session::has('message'))
<div class="alert alert-info">
{{Session::get('message')}}
</div>
@endif
示例6: array
<?php
$user_name = $array_usermenu = $array_register_menu = $array_login_menu = $array_login_attr = null;
if (Auth::guest()) {
$modal_remote = Bootstrapper\Modal::create('ModalLogin')->with_header('Login')->with_data_remote('/login/index/popup');
$modal_remote->autofooter = false;
$array_register_menu = array(__('interface.signup'), '/login/newuser', false, false, null, 'aw_user');
$array_login_menu = array(Navigation::link('Login', '#', false, false, null, 'aw_key icon-white'));
$array_login_attr = $modal_remote->get_launcher_attributes() + array('class' => 'pull-right');
echo $modal_remote;
} else {
$user_name = Auth::user()->name;
$array_usermenu = array($user_name, '#', false, false, array(array(__('interface.profile'), '/profile'), array(Navigation::DIVIDER), array(__('interface.logout'), '/logout')));
}
// Navigation Bar
echo Bootstrapper\Navbar::inverse(null, Navbar::FIX_TOP)->with_brand(Config::get('application.site-name'), '#')->with_menus(array(Navigation::link(Config::get('application.language', 'en'), '#', false, false, array(array('label' => 'English', 'url' => '/language/1'), array('label' => 'Italiano', 'url' => '/language/0')), 'flag icon-white')), array('class' => 'pull-right'))->with_menus($array_login_menu, $array_login_attr)->with_menus(array(Navigation::link('Home', '/', false, false, null, 'home icon-white')), array('class' => 'pull-left'))->with_menus(Navigation::links(array($array_register_menu, $array_usermenu)), array('class' => 'pull-right'))->collapsible();
?>
<div class="wrapper">
<div class="container">
@yield('content')
</div> <!-- /container -->
</div> <!-- /wrapper -->
<div class="push"><!-- / / --></div> <!-- /push -->
<footer>
示例7: url
<?php
echo Navbar::create(null, Navbar::FIX_TOP)->with_brand(Config::get('project.name.short', 'Project'), url('/'))->with_menus(Navigation::links([[trans('navigation.home'), url('/'), null, null, null, 'home']]))->collapsible();