diff --git a/dynamic_entity_reference.views.inc b/dynamic_entity_reference.views.inc index d0a6318..d429d26 100644 --- a/dynamic_entity_reference.views.inc +++ b/dynamic_entity_reference.views.inc @@ -159,7 +159,7 @@ function dynamic_entity_reference_views_data() { // Filter out non SQL entity types because \Drupal\views\EntityViewsData // class only allows entities with // \Drupal\Core\Entity\Sql\SqlEntityStorageInterface. - $targets = array_intersect(DynamicEntityReferenceItem::getTargetTypes($field->getSettings(), TRUE), array_keys($sql_entity_types)); + $targets = array_intersect(DynamicEntityReferenceItem::getTargetTypes($field->getSettings()), array_keys($sql_entity_types)); foreach ($targets as $target_entity_type_id) { if ($entity_manager->hasHandler($target_entity_type_id, 'views_data')) { $target_entity_type = $entity_types[$target_entity_type_id]; diff --git a/src/Plugin/Field/FieldType/DynamicEntityReferenceItem.php b/src/Plugin/Field/FieldType/DynamicEntityReferenceItem.php index d7ac3e9..92fc685 100644 --- a/src/Plugin/Field/FieldType/DynamicEntityReferenceItem.php +++ b/src/Plugin/Field/FieldType/DynamicEntityReferenceItem.php @@ -54,11 +54,7 @@ class DynamicEntityReferenceItem extends EntityReferenceItem { */ public static function defaultFieldSettings() { $default_settings = []; - $labels = \Drupal::service('entity_type.repository')->getEntityTypeLabels(TRUE); - $options = $labels[(string) t('Content', [], ['context' => 'Entity type group'])]; - - // Add configuration entities. - $options += $labels[(string) t('Configuration', [], ['context' => 'Entity type group'])]; + $options = \Drupal::service('entity_type.repository')->getEntityTypeLabels(); // Field storage settings are not accessible here so we are assuming that // all the entity types are referenceable by default.