diff --git a/core/lib/Drupal/Core/Entity/Routing/DefaultHtmlRouteProvider.php b/core/lib/Drupal/Core/Entity/Routing/DefaultHtmlRouteProvider.php index 120833d..eb29b98 100644 --- a/core/lib/Drupal/Core/Entity/Routing/DefaultHtmlRouteProvider.php +++ b/core/lib/Drupal/Core/Entity/Routing/DefaultHtmlRouteProvider.php @@ -320,8 +320,7 @@ protected function getCollectionRoute(EntityTypeInterface $entity_type) { $route ->addDefaults([ '_entity_list' => $entity_type->id(), - '_title' => $entity_type->getCollectionLabel(), - '_title_arguments' => ['@label' => $entity_type->getLabel()], + '_title' => (string) $entity_type->getCollectionLabel(), ]) ->setRequirement('_permission', $admin_permission); diff --git a/core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php b/core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php index a6675ec..b018abc 100644 --- a/core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/Routing/DefaultHtmlRouteProviderTest.php @@ -282,13 +282,13 @@ public function providerTestGetCollectionRoute() { $entity_type4->getAdminPermission()->willReturn('administer the entity type'); $entity_type4->id()->willReturn('the_entity_type_id'); $entity_type4->getLabel()->willReturn('The entity type'); + $entity_type4->getCollectionLabel()->willReturn('Test entities'); $entity_type4->getLinkTemplate('collection')->willReturn('/the/collection/link/template'); $entity_type4->isSubclassOf(FieldableEntityInterface::class)->willReturn(FALSE); $route = (new Route('/the/collection/link/template')) ->setDefaults([ '_entity_list' => 'the_entity_type_id', - '_title' => '@label entities', - '_title_arguments' => ['@label' => 'The entity type'], + '_title' => 'Test entities', ]) ->setRequirements([ '_permission' => 'administer the entity type',