twin-elements / admin-bundle
Admin bundle for CMS
Installs: 181
Dependents: 9
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Language:JavaScript
Type:symfony-bundle
Requires
- php: ^7.4 || ^8.0
- symfony/framework-bundle: ^4.4 || ^5.4
- symfonycasts/reset-password-bundle: ^1.13
- twin-elements/admin-translator: ^1.0
- twin-elements/crud-logger: ^1.0
- twin-elements/flashes: ^1.0
- twin-elements/form-extensions: ^1.5
- twin-elements/message: ^1.3
- twin-elements/response-parameter-builder: ^1.0
Conflicts
- twin-elements/message: <1.3
This package is auto-updated.
Last update: 2024-10-24 13:10:02 UTC
README
##Installation
composer require twin-elements/admin-bundle
in /config/packages/routes.yaml
add
admin_dashboard:
path: /admin/
controller: TwinElements\AdminBundle\Controller\DashboardController::index
methods: GET
options: { i18n: false }
admin_core:
resource: "@TwinElementsAdminBundle/Controller/"
type: annotation
prefix: /admin
requirements:
_locale: '%app_locales%'
defaults:
_locale: '%locale%'
_admin_locale: '%admin_locale%'
options: { i18n: false }
in /config/packages/security.yaml
add
imports:
- { resource: '@TwinElementsAdminBundle/Resources/config/security.yaml' }
in /config/packages/twin_elements_admin.yaml
add
imports:
- { resource: "@TwinElementsAdminBundle/config/config.yaml" }
twin_elements_admin: ~
How create a new Roles?
1.Create class implements TwinElements\AdminBundle\Role\RoleGroupInterface
2.Register class in services.yaml
<service id="YOUR_CLASS">
<tag name="twin_elements.role" priority="2-999"/>
</service>
3.Roles automatically implemented to roles list type 4.Add to messages.LANG.yaml translations as
role:
role_name: Role name
How create a new AdminMenu items
1.Create class implements TwinElements\AdminBundle\Menu\AdminMenuInterface
2.Register class in services.yaml
<service id="YOUR_CLASS">
<tag name="twin_elements.admin_menu"/>
</service>
3.Done
Creating a new super admin user
In the command line entre the command:
php bin/console te:admin:create_super_admin