Commit 1c41c324 authored by Dieter Holvoet's avatar Dieter Holvoet Committed by Jonathan Smith
Browse files

Issue #3282071 by DieterHolvoet: Add support for entities without label_collection key

parent 4d9de3be
Loading
Loading
Loading
Loading
+2 −3
Changes for src/Form/SchedulerAdminForm.php: 2 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -114,9 +114,8 @@ class SchedulerAdminForm extends ConfigFormBase {
        continue;
      }
      $bundle_id = reset($types)->bundle();
      $collection_label = $this->entityTypeManager->getStorage($bundle_id)->getEntityType()->get('label_collection');
      // Cater for incomplete config entity with no collection label.
      $collection_label = is_object($collection_label) ? $collection_label->__toString() : $collection_label;
      $entity_type_definition = $this->entityTypeManager->getStorage($bundle_id)->getEntityType();
      $collection_label = (string) ($entity_type_definition->get('label_collection') ?: $entity_type_definition->get('label'));
      $links[] = ['title' => "-- $collection_label --"];
      foreach ($types as $id => $type) {
        $text = [];