Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
2bba2a1a
Commit
2bba2a1a
authored
Sep 22, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding a view creator
parent
043c561a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
1 deletion
+24
-1
SidebarViewCreator.php
Composers/SidebarViewCreator.php
+20
-0
sidebar-nav.blade.php
Resources/views/partials/sidebar-nav.blade.php
+0
-1
composers.php
composers.php
+3
-0
start.php
start.php
+1
-0
No files found.
Composers/SidebarViewCreator.php
0 → 100644
View file @
2bba2a1a
<?php
namespace
Modules\Core\Composers
;
use
Illuminate\Support\Collection
;
use
Illuminate\Support\Facades\Config
;
class
SidebarViewCreator
{
public
function
create
(
$view
)
{
$view
->
prefix
=
Config
::
get
(
'core::core.admin-prefix'
);
$view
->
items
=
new
Collection
;
$view
->
items
->
put
(
'dashboard'
,
[
'weight'
=>
0
,
'request'
=>
$view
->
prefix
,
'route'
=>
'dashboard.index'
,
'icon-class'
=>
'fa fa-dashboard'
,
'title'
=>
'Dashboard'
,
]);
}
}
\ No newline at end of file
Resources/views/partials/sidebar-nav.blade.php
View file @
2bba2a1a
...
...
@@ -16,7 +16,6 @@
<!-- sidebar menu: : style can be found in sidebar.less -->
<ul
class=
"sidebar-menu"
>
<?php
$items
=
[];
?>
<?php
foreach
(
$items
as
$i
=>
$item
)
:
?>
<?php
if
(
is_object
(
$item
))
:
?>
<li
class=
"treeview {{ Request::is($item[0]['request']) ? 'active' : ''}}"
>
...
...
composers.php
0 → 100644
View file @
2bba2a1a
<?php
View
::
creator
(
'core::partials.sidebar-nav'
,
'Modules\Core\Composers\SidebarViewCreator'
);
\ No newline at end of file
start.php
View file @
2bba2a1a
...
...
@@ -26,4 +26,5 @@ Config::addNamespace('core', __DIR__ . '/Config/');
*/
require
__DIR__
.
'/Http/routes.php'
;
require
__DIR__
.
'/composers.php'
;
require
__DIR__
.
'/helpers.php'
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment