Code Duplication    Length = 17-18 lines in 2 locations

src/Admin/PostAdmin.php 1 location

@@ 106-122 (lines=17) @@
103
     *
104
     * @return void
105
     */
106
    protected function configureListFields(ListMapper $listMapper)
107
    {
108
        $listMapper
109
            ->add('mainPicture', 'string', ['template' => 'bundles/SonataAdmin/thumbnail.html.twig'])
110
            ->addIdentifier('title')
111
            ->add('createdAt')
112
            ->add('_action', 'actions',
113
                [
114
                    'actions' => [
115
                        'edit' => [],
116
                        'delete' => [],
117
                    ],
118
                ]
119
            )
120
121
        ;
122
    }
123
124
    /**
125
     * @param \Sonata\AdminBundle\Datagrid\DatagridMapper $datagridMapper

src/Admin/RoleAdmin.php 1 location

@@ 55-72 (lines=18) @@
52
     *
53
     * @return void
54
     */
55
    protected function configureListFields(ListMapper $listMapper)
56
    {
57
        $listMapper
58
            ->addIdentifier('title')
59
            ->add('description')
60
            ->add('performance')
61
            ->add('employee')
62
            ->add('_action', 'actions',
63
                [
64
                    'actions' => [
65
                        'show' => [],
66
                        'edit' => [],
67
                        'delete' => [],
68
                    ],
69
                ]
70
            )
71
        ;
72
    }
73
74
    /**
75
     * @param \Sonata\AdminBundle\Datagrid\DatagridMapper $datagridMapper