Commit 9b132b5e authored by webchick's avatar webchick
Browse files

Issue #2171753 by amateescu: Entity_reference_field_info_alter() overrides 'list_class' twice.

parent 46beacab
......@@ -18,13 +18,12 @@ function entity_reference_field_info_alter(&$info) {
// Make the entity reference field configurable.
$info['entity_reference']['configurable'] = TRUE;
$info['entity_reference']['class'] = '\Drupal\entity_reference\ConfigurableEntityReferenceItem';
$info['entity_reference']['list_class'] = '\Drupal\Core\Field\ConfigFieldItemList';
$info['entity_reference']['list_class'] = '\Drupal\entity_reference\Plugin\Field\FieldType\ConfigurableEntityReferenceFieldItemList';
$info['entity_reference']['settings']['target_type'] = \Drupal::moduleHandler()->moduleExists('node') ? 'node' : 'user';
$info['entity_reference']['instance_settings']['handler'] = 'default';
$info['entity_reference']['instance_settings']['handler_settings'] = array();
$info['entity_reference']['default_widget'] = 'entity_reference_autocomplete';
$info['entity_reference']['default_formatter'] = 'entity_reference_label';
$info['entity_reference']['list_class'] = '\Drupal\entity_reference\Plugin\Field\FieldType\ConfigurableEntityReferenceFieldItemList';
$info['entity_reference']['provider'] = 'entity_reference';
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment