caxy / easy-sonata-admin
Simplified Configuration system for Sonata Admin.
Installs: 70
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 5
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- sonata-project/admin-bundle: 2.3.*
This package is not auto-updated.
Last update: 2024-11-19 23:00:20 UTC
README
###Getting Started
- Add EasySonataAdminBundle to your project
composer require caxy/easy-sonata-admin
- Enable the bundle
// app/AppKernal.php class AppKernel extends Kernel { public function registerBundles() { $bundles = array( //Load before SonataAdminBundle! new Caxy\EasySonataAdminBundle\EasySonataAdminBundle(), new Sonata\AdminBundle\SonataAdminBundle(), ); } }
- Configure your admin. Example for FOS User Entity below:
// app/config/config.yml easy_sonata_admin: entities: User: class: AppBundle\Entity\User batch_actions: - '-delete' list: fields: - id - username - email - enabled actions: [show: {}, 'edit', 'delete'] edit: fields: - { property: id, type_options: { } } - { property: username, type_options: { } } - { property: email, type_options: { } } - { property: enabled, type_options: { } } - { property: 'plain_password', type: 'text', type_options: { required: true } } actions: ['-delete'] filter: fields: - username - email - enabled - roles show: fields: - username - email - enabled - { property: 'last_login', type: 'datetime' } - roles actions: ['-delete']