| Total Complexity | 4 |
| Total Lines | 61 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 15 | final class NotificationAdmin extends AbstractAdmin |
||
| 16 | { |
||
| 17 | protected function configureDatagridFilters(DatagridMapper $datagridMapper): void |
||
| 27 | ; |
||
| 28 | } |
||
| 29 | |||
| 30 | protected function configureListFields(ListMapper $listMapper): void |
||
| 31 | { |
||
| 32 | $listMapper |
||
| 33 | ->add('id') |
||
| 34 | ->add('title') |
||
| 35 | ->add('text') |
||
| 36 | ->add('url') |
||
| 37 | ->add('label') |
||
| 38 | ->add('created') |
||
| 39 | ->add('updated') |
||
| 40 | ->add('_action', null, [ |
||
| 41 | 'actions' => [ |
||
| 42 | 'show' => [], |
||
| 43 | 'edit' => [], |
||
| 44 | 'delete' => [], |
||
| 45 | ], |
||
| 46 | ]); |
||
| 47 | } |
||
| 48 | |||
| 49 | protected function configureFormFields(FormMapper $formMapper): void |
||
| 50 | { |
||
| 51 | $formMapper |
||
| 52 | ->add('title') |
||
| 53 | ->add('text') |
||
| 54 | ->add('url') |
||
| 55 | ->add('label', ChoiceType::class, [ |
||
| 56 | 'choices' => [ |
||
| 57 | 'New' => NotificationInterface::LABEL_NEW, |
||
| 58 | 'Important' => NotificationInterface::LABEL_IMPORTANT, |
||
| 59 | ], |
||
| 60 | 'required' => true, |
||
| 61 | ] |
||
| 62 | ) |
||
| 63 | ; |
||
| 64 | } |
||
| 65 | |||
| 66 | protected function configureShowFields(ShowMapper $showMapper): void |
||
| 76 | ; |
||
| 77 | } |
||
| 78 | } |
||
| 79 |