aropixel / page-bundle
Gestion de page pour admin Aropixel
Installs: 2 160
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 3
Type:symfony-bundle
Requires
- aropixel/admin-bundle: ^1.2
- dev-master
- v2.0.11
- v2.0.10
- v2.0.9
- v2.0.8
- v2.0.7
- v2.0.6
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0.0
- 1.1.x-dev
- v1.1.5
- v1.1.4
- v1.1.3
- v1.1.2
- v1.1.1
- v1.1
- v1.0.1
- v1.0.0
- 0.1.x-dev
- v0.1.2
- v0.1.1
- v0.1.0
- dev-release/symfony7
- dev-release/v3.0.0
- dev-feature/translatable
- dev-feature/v3.0.0/image
- dev-feature/v3.0.0/page/lcr
- dev-develop
- dev-release/v3.0
- dev-feature/v2
- dev-feature/block
This package is auto-updated.
Last update: 2024-10-31 16:33:15 UTC
README
Aropixel Page Bundle
Aropixel Page Bundle is a complementray bundle of Aropixel Admin Bundle. It gives possibility to manage standard pages for your website.
Table of contents
Quick start
- Create your symfony 4 project & install Aropixel AdminBundle
- Require Aropixel Page Bundle :
composer require aropixel/page-bundle
- Apply migrations
- Include the routes :
aropixel_page:
resource: '@AropixelPageBundle/Resources/config/routing.yml'
prefix: /admin
- create a ConfigureMenuListener class, register it as an event listener and include the page menu in the listener:
App\EventListener\ConfigureMenuListener:
tags:
- { name: kernel.event_listener, event: aropixel.admin_menu_configure, method: onMenuConfigure }
<?php
declare(strict_types=1);
// src/AppBundle/EventListener/ConfigureMenuListener.php
namespace App\EventListener;
use Aropixel\AdminBundle\Event\ConfigureMenuEvent;
use Aropixel\AdminBundle\Menu\AbstractMenuListener;
class ConfigureMenuListener extends AbstractMenuListener
{
/**
* @param ConfigureMenuEvent $event
*/
public function onMenuConfigure(ConfigureMenuEvent $event)
{
$request = $this->requestStack->getCurrentRequest();
$this->factory = $event->getFactory();
$this->em = $event->getEntityManager();
$this->routeName = $request->get('_route');
$this->routeParameters = $request->get('_route_params');
$this->menu = $event->getAppMenu('main');
if (!$this->menu) {
$this->menu = $this->createRoot();
}
$pageMenu = [
'route' => 'aropixel_page_index',
'routeParameters' => [
'type' => 'default'
]
];
$this->addItem('Pages', $pageMenu, 'far fa-file');
$event->addAppMenu($this->menu, false, 'main');
}
}
License
Aropixel Page Bundle is under the MIT License