diff --git a/core/modules/field/modules/entityreference/lib/Drupal/entityreference/Plugin/entityreference/selection/SelectionBase.php b/core/modules/field/modules/entityreference/lib/Drupal/entityreference/Plugin/entityreference/selection/SelectionBase.php index afedd65..37e8156 100644 --- a/core/modules/field/modules/entityreference/lib/Drupal/entityreference/Plugin/entityreference/selection/SelectionBase.php +++ b/core/modules/field/modules/entityreference/lib/Drupal/entityreference/Plugin/entityreference/selection/SelectionBase.php @@ -170,10 +170,12 @@ public function getReferencableEntities($match = NULL, $match_operator = 'CONTAI } $options = array(); + $entity_info = entity_get_info($entity_type); $entities = entity_load_multiple($entity_type, array_keys($result[$entity_type])); foreach ($entities as $entity_id => $entity) { $bundle = $entity->bundle(); - $options[$bundle][$entity_id] = check_plain($entity->label()); + $bundle_label = check_plain($entity_info['bundles'][$bundle]['label']); + $options[$bundle_label][$entity_id] = check_plain($entity->label()); } return $options;