【发布时间】:2019-05-29 05:21:39
【问题描述】:
我正在编辑 Sonata 生成的管理类。它处理基于计划和已完成分发的视频过滤。该类已经包含以下内容:
protected function configureDatagridFilters(DatagridMapper $datagridMapper)
{
$datagridMapper
->add('producedTill', 'doctrine_orm_date', [], 'sonata_type_datetime_picker',
$this->getDatePickerDefinitions(2, true, 3))
->add('plannedDistributions', null, [], null,
$this->getEntityDefinitions('AppBundle:DistributionChannel', 1, true, 4))
}
... 这为我提供了一个不错的 UI,其中包括我的应用程序中“计划分发”字段的下拉列表。
现在我想为已完成的分发添加另一个下拉列表。我添加以下内容:
->add('distributions', null, [], null,
$this->getEntityDefinitions('AppBundle:DistributionChannel', 1, true, 4))
...但是在重新加载列表视图时,我收到以下消息:
选项“选择”、“多个”不存在。定义的选项是: “动作”、“allow_extra_fields”、“attr”、“auto_initialize”、 “block_name”、“by_reference”、“cascade_validation”、“compound”、 “约束”、“csrf_field_name”、“csrf_message”、“csrf_protection”、 “csrf_provider”、“csrf_token_id”、“csrf_token_manager”、“数据”、 “data_class”、“description”、“disabled”、“empty_data”、 “error_bubbling”、“error_mapping”、“extra_fields_message”、 “horizontal_input_wrapper_class”,“horizontal_label_class”, “horizontal_label_offset_class”、“inherit_data”、“意图”、 “无效消息”、“无效消息参数”、“标签”、 “label_attr”、“label_format”、“label_render”、“mapped”、“max_length”、 “方法”、“模式”、“post_max_size_message”、“property_path”、 “只读”、“必需”、“奏鸣曲管理员”、“奏鸣曲字段描述”、 “奏鸣曲帮助”,“翻译域”,“修剪”, “upload_max_size_message”、“validation_groups”、“虚拟”。
我不相信我试图在我的 configureDatagridFilters 方法中定义任何“选择”或“多个”选项。这里会发生什么?
【问题讨论】: