| 1 | <?php |
||
| 2 | |||
| 3 | namespace PHPDish\DailySongPlugin\Admin; |
||
| 4 | |||
| 5 | use Sonata\AdminBundle\Admin\AbstractAdmin; |
||
|
0 ignored issues
–
show
|
|||
| 6 | use Sonata\AdminBundle\Datagrid\DatagridMapper; |
||
|
0 ignored issues
–
show
The type
Sonata\AdminBundle\Datagrid\DatagridMapper was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 7 | use Sonata\AdminBundle\Datagrid\ListMapper; |
||
|
0 ignored issues
–
show
The type
Sonata\AdminBundle\Datagrid\ListMapper was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 8 | use Sonata\AdminBundle\Form\FormMapper; |
||
|
0 ignored issues
–
show
The type
Sonata\AdminBundle\Form\FormMapper was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 9 | |||
| 10 | class SongAdmin extends AbstractAdmin |
||
| 11 | { |
||
| 12 | protected function configureDatagridFilters(DatagridMapper $filter) |
||
| 13 | { |
||
| 14 | $filter |
||
| 15 | ->add('name', null); |
||
| 16 | } |
||
| 17 | |||
| 18 | protected function configureListFields(ListMapper $list) |
||
| 19 | { |
||
| 20 | $list |
||
| 21 | ->addIdentifier('name', null, ['label' => '标题']) |
||
| 22 | ->add('src', null, ['label' => 'URL']) |
||
| 23 | ->add('srcId', null, ['label' => '歌曲ID']) |
||
| 24 | ->add('enabled', null, ['editable' => true, 'label' => '状态']); |
||
| 25 | } |
||
| 26 | |||
| 27 | protected function configureFormFields(FormMapper $form) |
||
| 28 | { |
||
| 29 | $form |
||
| 30 | ->add('name', null, ['label' => '标题']) |
||
| 31 | ->add('src', null, ['label' => 'URL']) |
||
| 32 | ->add('srcId', null, ['label' => '歌曲ID']) |
||
| 33 | ->add('enabled', null, ['label' => '状态']); |
||
| 34 | } |
||
| 35 | } |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths