Aplicación para gestionar el WiFi y punto de luz en puertos.
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.

53 lines
1.2 KiB

  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Admin;
  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 PresupuestosAdmin extends AbstractAdmin
  10. {
  11. protected function configureDatagridFilters(DatagridMapper $filter): void
  12. {
  13. $filter
  14. ->add('id')
  15. ->add('cantidad')
  16. ;
  17. }
  18. protected function configureListFields(ListMapper $list): void
  19. {
  20. $list
  21. ->add('id')
  22. ->add('cantidad')
  23. ->add(ListMapper::NAME_ACTIONS, null, [
  24. 'actions' => [
  25. 'show' => [],
  26. 'edit' => [],
  27. 'delete' => [],
  28. ],
  29. ]);
  30. }
  31. protected function configureFormFields(FormMapper $form): void
  32. {
  33. $form
  34. ->add('id')
  35. ->add('cantidad')
  36. ;
  37. }
  38. protected function configureShowFields(ShowMapper $show): void
  39. {
  40. $show
  41. ->add('id')
  42. ->add('cantidad')
  43. ;
  44. }
  45. }