fbeen / adminbundle
Bootstrap easy to config admin
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^7.0.8
- ext-intl: *
- doctrine/inflector: ^1.2
- nikic/php-parser: ^4.0
- symfony/config: ^3.4|^4.0
- symfony/console: ^3.4|^4.0
- symfony/dependency-injection: ^3.4|^4.0
- symfony/filesystem: ^3.4|^4.0
- symfony/finder: ^3.4|^4.0
- symfony/framework-bundle: ^3.4|^4.0
- symfony/http-kernel: ^3.4|^4.0
- symfony/maker-bundle: >1.1
This package is not auto-updated.
Last update: 2024-11-11 10:32:49 UTC
README
This bundle is under development!
/config/routes.yaml
# fbeen-admin
admin_area:
resource: "@FbeenAdminBundle/Resources/config/routing.yaml"
prefix: /testje
/src/Admin/ContactAdmin.yaml
<?php
namespace App\Admin;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Fbeen\AdminBundle\Admin\AbstractAdmin;
use App\Entity\Contact;
/**
* Description of ContactAdmin
*
* @author Frank Beentjes <frankbeen@gmail.com>
*/
class ContactAdmin extends AbstractAdmin
{
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults([
'entity' => Contact::class,
'label' => 'Contactverzoeken',
'icon' => 'fas fa-phone-volume',
'slug' => 'contactverzoeken',
]);
}
protected function configureListFields(ListMapper $listMapper): void
{
$listMapper
->addIdentifier('__toString', null, ['label' => 'Adres'])
->add('description', null, ['label' => 'Zoeknaam'])
->add('_action', null, [
'actions' => [
'show' => [],
'edit' => [],
'delete' => [],
],
]);
}
}
config/services.yaml
# admins are imported separately to make sure services can be injected
# as action arguments even if you don't extend any base admin class
App\Admin\:
resource: '../src/Admin'
tags: ['fbeen.admin']