diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php index 0a87898..4b0755f 100644 --- a/core/lib/Drupal/Core/Entity/EntityManager.php +++ b/core/lib/Drupal/Core/Entity/EntityManager.php @@ -1028,13 +1028,11 @@ protected function getDisplayModeOptions($display_type, $entity_type_id) { * An array of display mode labels, keyed by the display mode ID. */ protected function getDisplayModeOptionsByBundle($display_type, $entity_type_id, $bundle, $include_disabled) { - $options = array('default' => t('Default')); - // Collect all the entity's display modes. $display_modes = $this->getDisplayModeOptions($display_type, $entity_type_id); - // Remove the displays that are not set to active for this bundle if they - // should not be returned. + // Remove the display modes that are not set to active for this bundle if + // they should not be returned. if (!$include_disabled) { $load_ids = array(); // Get the list of available entity displays for the current bundle. @@ -1050,12 +1048,12 @@ protected function getDisplayModeOptionsByBundle($display_type, $entity_type_id, foreach (array_keys($display_modes) as $mode) { $display_id = $entity_type_id . '.' . $bundle . '.' . $mode; if (!isset($displays[$display_id]) || !$displays[$display_id]->status()) { - unset($options[$mode]); + unset($display_modes[$mode]); } } } - return $options; + return $display_modes; } /**