Licitator 1.0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.0 KiB

5 years ago
  1. <?= "<?php\n" ?>
  2. declare(strict_types=1);
  3. namespace <?= $namespace ?>;
  4. use Sonata\AdminBundle\Admin\AbstractAdmin;
  5. use Sonata\AdminBundle\Datagrid\DatagridMapper;
  6. use Sonata\AdminBundle\Datagrid\ListMapper;
  7. use Sonata\AdminBundle\Form\FormMapper;
  8. use Sonata\AdminBundle\Show\ShowMapper;
  9. final class <?= $class_name ?> extends AbstractAdmin
  10. {
  11. protected function configureDatagridFilters(DatagridMapper $datagridMapper): void
  12. {
  13. $datagridMapper
  14. <?= $fields ?>;
  15. }
  16. protected function configureListFields(ListMapper $listMapper): void
  17. {
  18. $listMapper
  19. <?= $fields ?>->add('_action', null, [
  20. 'actions' => [
  21. 'show' => [],
  22. 'edit' => [],
  23. 'delete' => [],
  24. ],
  25. ]);
  26. }
  27. protected function configureFormFields(FormMapper $formMapper): void
  28. {
  29. $formMapper
  30. <?= $fields ?>;
  31. }
  32. protected function configureShowFields(ShowMapper $showMapper): void
  33. {
  34. $showMapper
  35. <?= $fields ?>;
  36. }
  37. }