diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php index 652af59..36f87ca 100644 --- a/core/lib/Drupal/Core/Entity/EntityManager.php +++ b/core/lib/Drupal/Core/Entity/EntityManager.php @@ -419,14 +419,16 @@ public function getAllBundleInfo() { public function getEntityTypeLabels($group = FALSE) { $options = array(); foreach ($this->getDefinitions() as $entity_type => $definition) { - if ($group && ($group_label = $definition->getGroupLabel())) { + if ($group) { + $group_label = $definition->getGroupLabel() ?: \Drupal::translation()->translate('Other', array(), array('context' => 'Entity type group')); $options[$group_label][$entity_type] = $definition->getLabel(); } else { $options[$entity_type] = $definition->getLabel(); } } - array_multisort($options); + // Sort the list alphabetically by group label. + array_multisort($options, SORT_DESC); return $options; }