Sonata Admin-setFormTheme列表视图错误

时间:2019-03-13 10:34:11

标签: php symfony admin sonata-admin symfony-3.4

我在我的奏鸣曲管理员列表菜单中设置了几个实体。其中两个可以正常工作,但是当我添加第三个时,会引发错误。

这只是简单的列表视图,我不知道错误是从哪里来的。

  

无效的服务“ app.main”:方法“ MainApp \ Base \ Service \ AppService :: setFormTheme()”不存在。

在我的services.yml中:

app.first:
   class: MainApp\Base\Service\FirstService
   arguments: [~, MainApp\Base\Entity\Client\First, ~]
   tags:
     - { name: sonata.admin, manager_type: orm, group: First, label: First }

app.second:
    class: MainApp\Base\Service\SecondService
    arguments: [~, MainApp\Base\Entity\Client\Second, ~]
    tags:
      - { name: sonata.admin, manager_type: orm, group: Second, label: Second }

app.third:
    class: MainApp\Base\Service\ThirdService
    arguments: [~, MainApp\Base\Entity\Card\Third, ~]
    tags:
      - { name: sonata.admin, manager_type: orm, group: Third, label: Third }

以及我的第三项服务:

 protected function configureListFields(ListMapper $listMapper)
{
    $listMapper
        ->add('one')
        ->add('two')
        ->add('three');
}

当我将“ app.third”导入services.yml时,会引发我提到的错误。

0 个答案:

没有答案