FeedHtmlRouteProvider::getCanonicalRoute

protected FeedHtmlRouteProvider::getCanonicalRoute(EntityTypeInterface $entity_type)

Gets the canonical route.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type.

Return value

\Symfony\Component\Routing\Route|null The generated route, if available.

Overrides DefaultHtmlRouteProvider::getCanonicalRoute

File

core/modules/aggregator/src/FeedHtmlRouteProvider.php, line 16

Class

FeedHtmlRouteProvider
Provides HTML routes for the feed entity type.

Namespace

Drupal\aggregator

Code

1
2
3
4
5
6
protected function getCanonicalRoute(EntityTypeInterface $entity_type) {
  $route = parent::getCanonicalRoute($entity_type);
  $route->setDefault('_title_controller', '\Drupal\aggregator\Controller\AggregatorController::feedTitle');
 
  return $route;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.