EasyAdmin 数组字段
此字段显示 array
类型的 Doctrine 属性的内容,并允许使用 JavaScript 动态添加新元素。
在表单页面(编辑和新建)中,它看起来像这样

基本信息
- PHP 类:
EasyCorp
\Bundle \EasyAdminBundle \Field \ArrayField - 用于存储此值的 Doctrine DBAL 类型:
array
,simple_array
或json_array
- 用于渲染字段的 Symfony 表单类型: CollectionType
渲染为:
1 2 3 4
<!-- when loading the page this is transformed into a dynamic collection via JavaScript --> <input type="text" value="..."> <input type="text" value="..."> <!-- ... -->
选项
此字段未定义任何自定义选项。
这项工作,包括代码示例,根据 Creative Commons BY-SA 3.0 许可协议获得许可。