我正在使用 Symfony框架和 SonataBundle 来构建管理应用程序。
当我尝试设置类型为blob的字段并使用 的" sonata_simple_formatter_type " 时SonataFormatterBundle ,我收到了错误:
Could not load type "sonata_simple_formatter_type"
这是我的composer.json文件:
"symfony/symfony": "2.8.*",
"doctrine/orm": "^2.4.8",
//*...*/
"sonata-project/admin-bundle": "2.3.10",
"sonata-project/doctrine-orm-admin-bundle": "2.3.3",
"sonata-project/user-bundle": "2.2.4",
"sonata-project/formatter-bundle": "2.3.3",
我更喜欢这个链接来制作管理员应用:sonata formatter
答案 0 :(得分:2)
要修复错误,您还需要配置SonataFormatterBundle:https://sonata-project.org/bundles/formatter/master/doc/reference/installation.html
对于SonataAdminBundle,您还需要进行一些额外配置:https://sonata-project.org/bundles/formatter/master/doc/reference/formatter_widget.html#sonata-admin-integration