src/Infraestructure/Admin/EstadoExpedienteAdmin.php line 12

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Infraestructure\Admin;
  4. use App\Domain\Repository\EstadoRepositoryInterface;
  5. use Sonata\AdminBundle\Datagrid\ListMapper;
  6. final class EstadoExpedienteAdmin extends EstadoAdmin
  7. {
  8.     public function __construct($code$class$baseControllerName, protected EstadoRepositoryInterface $estadoRepository)
  9.     {
  10.         parent::__construct($code$class$baseControllerName$this->estadoRepository);
  11.     }
  12.     protected function configureListFields(ListMapper $list): void
  13.     {
  14.         $this->setTranslationDomain('estadoAdmin');
  15.         $list
  16.             ->add('key'null, [
  17.                 'label' => 'list.estado.label.key'
  18.             ])
  19.             ->add('nombre'null, [
  20.                 'label' => 'list.estado.label.nombre'
  21.             ])
  22.             ->add('subestado'null, [
  23.                 'label' => 'list.estado.label.subestado'
  24.             ])
  25.             ->add('color'null, [
  26.                 'label' => 'list.estado.label.color'
  27.             ])
  28.             ->add('icono'null, [
  29.                 'label' => 'list.estado.label.icono'
  30.             ])
  31.             ->add('orden'null, [
  32.                 'label' => 'list.estado.label.orden'
  33.             ])
  34.             ->add(ListMapper::NAME_ACTIONSnull, [
  35.                 'label' => false,
  36.                 'actions' => [
  37.                     'edit' => [],
  38.                     'delete' => [],
  39.                 ],
  40.                 'header_style' => 'width: 85px',
  41.             ])
  42.         ;
  43.     }
  44. }