| Total Complexity | 4 |
| Total Lines | 64 |
| 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('urlTitle') |
||
| 38 | ->add('label') |
||
| 39 | ->add('created') |
||
| 40 | ->add('updated') |
||
| 41 | ->add('_action', null, [ |
||
| 42 | 'actions' => [ |
||
| 43 | 'show' => [], |
||
| 44 | 'edit' => [], |
||
| 45 | 'delete' => [], |
||
| 46 | ], |
||
| 47 | ]); |
||
| 48 | } |
||
| 49 | |||
| 50 | protected function configureFormFields(FormMapper $formMapper): void |
||
| 51 | { |
||
| 52 | $formMapper |
||
| 53 | ->add('title') |
||
| 54 | ->add('text') |
||
| 55 | ->add('url') |
||
| 56 | ->add('urlTitle') |
||
| 57 | ->add('label', ChoiceType::class, [ |
||
| 58 | 'choices' => [ |
||
| 59 | 'New' => NotificationInterface::LABEL_NEW, |
||
| 60 | 'Important' => NotificationInterface::LABEL_IMPORTANT, |
||
| 61 | ], |
||
| 62 | 'required' => true, |
||
| 63 | ] |
||
| 64 | ) |
||
| 65 | ; |
||
| 66 | } |
||
| 67 | |||
| 68 | protected function configureShowFields(ShowMapper $showMapper): void |
||
| 79 | ; |
||
| 80 | } |
||
| 81 | } |
||
| 82 |