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
2185318f
Unverified
Commit
2185318f
authored
Jul 25, 2017
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Using new sidebar event listener for Workshop module
parent
1b71f1df
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
20 deletions
+14
-20
RegisterWorkshopSidebar.php
Modules/Workshop/Events/Handlers/RegisterWorkshopSidebar.php
+4
-19
WorkshopServiceProvider.php
Modules/Workshop/Providers/WorkshopServiceProvider.php
+9
-1
changelog.yml
Modules/Workshop/changelog.yml
+1
-0
No files found.
Modules/Workshop/
Sidebar/SidebarExtende
r.php
→
Modules/Workshop/
Events/Handlers/RegisterWorkshopSideba
r.php
View file @
2185318f
<?php
<?php
namespace
Modules\Workshop\
Sidebar
;
namespace
Modules\Workshop\
Events\Handlers
;
use
Maatwebsite\Sidebar\Group
;
use
Maatwebsite\Sidebar\Group
;
use
Maatwebsite\Sidebar\Item
;
use
Maatwebsite\Sidebar\Item
;
use
Maatwebsite\Sidebar\Menu
;
use
Maatwebsite\Sidebar\Menu
;
use
Modules\
User\Contracts\Authentication
;
use
Modules\
Core\Sidebar\AbstractAdminSidebar
;
class
SidebarExtender
implements
\Maatwebsite\Sidebar\SidebarExtende
r
class
RegisterWorkshopSidebar
extends
AbstractAdminSideba
r
{
{
/**
/**
* @var Authentication
* Method used to define your sidebar menu groups and items
*/
protected
$auth
;
/**
* @param Authentication $auth
*
* @internal param Guard $guard
*/
public
function
__construct
(
Authentication
$auth
)
{
$this
->
auth
=
$auth
;
}
/**
* @param Menu $menu
* @param Menu $menu
*
* @return Menu
* @return Menu
*/
*/
public
function
extendWith
(
Menu
$menu
)
public
function
extendWith
(
Menu
$menu
)
...
...
Modules/Workshop/Providers/WorkshopServiceProvider.php
View file @
2185318f
...
@@ -3,12 +3,15 @@
...
@@ -3,12 +3,15 @@
namespace
Modules\Workshop\Providers
;
namespace
Modules\Workshop\Providers
;
use
Illuminate\Support\ServiceProvider
;
use
Illuminate\Support\ServiceProvider
;
use
Modules\Core\Events\BuildingSidebar
;
use
Modules\Core\Services\Composer
;
use
Modules\Core\Services\Composer
;
use
Modules\Core\Traits\CanGetSidebarClassForModule
;
use
Modules\Core\Traits\CanPublishConfiguration
;
use
Modules\Core\Traits\CanPublishConfiguration
;
use
Modules\Workshop\Console\EntityScaffoldCommand
;
use
Modules\Workshop\Console\EntityScaffoldCommand
;
use
Modules\Workshop\Console\ModuleScaffoldCommand
;
use
Modules\Workshop\Console\ModuleScaffoldCommand
;
use
Modules\Workshop\Console\ThemeScaffoldCommand
;
use
Modules\Workshop\Console\ThemeScaffoldCommand
;
use
Modules\Workshop\Console\UpdateModuleCommand
;
use
Modules\Workshop\Console\UpdateModuleCommand
;
use
Modules\Workshop\Events\Handlers\RegisterWorkshopSidebar
;
use
Modules\Workshop\Manager\StylistThemeManager
;
use
Modules\Workshop\Manager\StylistThemeManager
;
use
Modules\Workshop\Manager\ThemeManager
;
use
Modules\Workshop\Manager\ThemeManager
;
use
Modules\Workshop\Scaffold\Module\Generators\EntityGenerator
;
use
Modules\Workshop\Scaffold\Module\Generators\EntityGenerator
;
...
@@ -20,7 +23,7 @@ use Modules\Workshop\Scaffold\Theme\ThemeScaffold;
...
@@ -20,7 +23,7 @@ use Modules\Workshop\Scaffold\Theme\ThemeScaffold;
class
WorkshopServiceProvider
extends
ServiceProvider
class
WorkshopServiceProvider
extends
ServiceProvider
{
{
use
CanPublishConfiguration
;
use
CanPublishConfiguration
,
CanGetSidebarClassForModule
;
/**
/**
* Indicates if loading of the provider is deferred.
* Indicates if loading of the provider is deferred.
*
*
...
@@ -37,6 +40,11 @@ class WorkshopServiceProvider extends ServiceProvider
...
@@ -37,6 +40,11 @@ class WorkshopServiceProvider extends ServiceProvider
{
{
$this
->
registerCommands
();
$this
->
registerCommands
();
$this
->
bindThemeManager
();
$this
->
bindThemeManager
();
$this
->
app
[
'events'
]
->
listen
(
BuildingSidebar
::
class
,
$this
->
getSidebarClassForModule
(
'workshop'
,
RegisterWorkshopSidebar
::
class
)
);
}
}
public
function
boot
()
public
function
boot
()
...
...
Modules/Workshop/changelog.yml
View file @
2185318f
...
@@ -9,6 +9,7 @@ versions:
...
@@ -9,6 +9,7 @@ versions:
-
Register module migrations by default to ease testing in service provider
-
Register module migrations by default to ease testing in service provider
-
SidebarExtender class has been removed in favor of new Sidebar event handlers
-
SidebarExtender class has been removed in favor of new Sidebar event handlers
-
Register the sidebar event handler in service provider
-
Register the sidebar event handler in service provider
-
Sidebar is now loaded via the <code>BuildingSidebar</code> hook
removed
:
removed
:
-
Removing ckeditor from the default scaffolded views, now included via <code>EditorIsRendering</code> hook
-
Removing ckeditor from the default scaffolded views, now included via <code>EditorIsRendering</code> hook
"
2.4.0"
:
"
2.4.0"
:
...
...
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