使用Sonata Admin来处理Doctrine json_array字段 [英] Using Sonata Admin to work with Doctrine json_array fields

查看:229
本文介绍了使用Sonata Admin来处理Doctrine json_array字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有使用Sonata Admin管理Doctrine json_array 字段的内置方式?

Is there any 'built in' way to administer Doctrine json_array fields using Sonata Admin?

我可以在Symfony / Sonata文档(或代码)中找不到任何有用的文档(或相关代码),但我希望我错过了一些东西!

I can't find any useful documentation (or relevant code) in the Symfony / Sonata docs (or code), but I'm hoping that I missed something!

理想情况下,我会喜欢看到序列化的键/值对以删除它们的方式添加一些新的,但我想我将不得不自己写...

Ideally I would like to see the serialised key/value pairs with a way to delete any of them and add some new ones, but I guess I'm going to have to write that up myself...

推荐答案

您可以使用 json_array 与任何数组一样,因此您可以使用集合类型 sonata类型集合
我喜欢那种奏鸣曲类型,关心为你添加/删除JavaScript。

You work with json_array just like with any array so You can go with collection type or sonata type collection. I like that sonata type takes care about add/delete JavaScript for You.

这篇关于使用Sonata Admin来处理Doctrine json_array字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆