This repository has been archived by the owner on Mar 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added admin-class, navigation and route-definition
- Loading branch information
1 parent
e32d294
commit 22e3c6a
Showing
8 changed files
with
124 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of Sulu. | ||
* | ||
* (c) MASSIVE ART WebServices GmbH | ||
* | ||
* This source file is subject to the MIT license that is bundled | ||
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace Sulu\Bundle\ExampleEventBundle\Admin; | ||
|
||
use Sulu\Bundle\AdminBundle\Admin\Admin; | ||
use Sulu\Bundle\AdminBundle\Admin\Routing\Route; | ||
use Sulu\Bundle\AdminBundle\Navigation\Navigation; | ||
use Sulu\Bundle\AdminBundle\Navigation\NavigationItem; | ||
|
||
class EventAdmin extends Admin | ||
{ | ||
public function getNavigation(): Navigation | ||
{ | ||
$rootNavigationItem = $this->getNavigationItemRoot(); | ||
|
||
$module = new NavigationItem('example_event.events'); | ||
$module->setPosition(40); | ||
$module->setIcon('su-calendar'); | ||
|
||
$events = new NavigationItem('example_event.events'); | ||
$events->setPosition(10); | ||
$events->setMainRoute('example_event.event_datagrid'); | ||
|
||
$module->addChild($events); | ||
$rootNavigationItem->addChild($module); | ||
|
||
return new Navigation($rootNavigationItem); | ||
} | ||
|
||
public function getRoutes(): array | ||
{ | ||
return [ | ||
(new Route('example_event.event_datagrid', '/events', 'sulu_admin.datagrid')) | ||
->addOption('title', 'example_event.events') | ||
->addOption('adapters', ['table']) | ||
->addOption('resourceKey', 'events'), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"example_event.events": "Veranstaltungen", | ||
"example_event.title": "Titel", | ||
"example_event.start-date": "Start", | ||
"example_event.end-date": "Ende", | ||
"example_event.created": "Erstellt am", | ||
"example_event.creator": "Erstellt von", | ||
"example_event.changed": "Bearbeitet am", | ||
"example_event.changer": "Bearbeitet von" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"example_event.events": "Events", | ||
"example_event.title": "Title", | ||
"example_event.start-date": "Start", | ||
"example_event.end-date": "End", | ||
"example_event.created": "Created at", | ||
"example_event.creator": "Created by", | ||
"example_event.changed": "Changed at", | ||
"example_event.changer": "Changed by" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"example_event.events": "Veranstaltungen" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"example_event.event": "Events" | ||
} |