Sonata Admin自定义表单操作-通配符/ __call

问题描述

嗨,我尝试使用自定义路由创建通配符编辑操作。

受保护的函数configureRoutes(RouteCollection $ collection) {

    $collection->add('customFormA',null,[]);
    $collection->add('customFormB',[]);

我想要此操作将由我的管理员解决,例如configureFormFields

我重写了CrudController,但添加__call不够

Sensio \ Bundle \ FrameworkExtraBundle \ EventListener \ ControllerListener:onKernelController

给出错误-检查该方法是否存在。

所以也许可以在路由构建中推送选项/认值

这里

$collection->add('customFormA',[]);
$collection->add('customFormB',[]..... [
method: 'MyMagicCrudAction',formVersion: 'customFormB'
]);

有什么主意吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)