【问题标题】:Could not load type "oro_collection": class does not exist.?无法加载类型“oro_collection”:类不存在。?
【发布时间】:2020-05-21 02:02:18
【问题描述】:

我在 orocrm symfony 3 中使用集合,但出现以下错误 无法加载类型“oro_collection”:类不存在。

public function configureOptions(OptionsResolver $resolver)
    {

        $resolver->setDefaults(
            [

                'entry_type' => AppraisalParameterRatingType::class,
                'required' => false,
                'entry_options'=> array(
                'data_class' => 'Hrroll\\Bundle\\AppraisalsBundle\\Entity\\AppraisalParameterRating'
                )
            ]
        );
    }

【问题讨论】:

  • 我在这里看不到 'oro_collection' 类型。

标签: php symfony-3.4 orocrm


【解决方案1】:

升级到 Symfony 3 后,您应该使用 FQCN 而不是表单类型的类别名。 更多详情Symfony 3.0 upgrade documentation

所以应该是 CollectionType::class 而不是 oro_collection。这是一个例子:Oro/Bundle/ReminderBundle/Form/Type/ReminderCollectionType

【讨论】:

    猜你喜欢
    • 2018-06-21
    • 1970-01-01
    • 1970-01-01
    • 2012-08-14
    • 2015-08-28
    • 2016-03-05
    • 2014-08-09
    • 2015-04-16
    • 2010-09-08
    相关资源
    最近更新 更多