You are here

protected function FeedHtmlRouteProvider::getCanonicalRoute in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/aggregator/src/FeedHtmlRouteProvider.php \Drupal\aggregator\FeedHtmlRouteProvider::getCanonicalRoute()

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 21
Contains \Drupal\aggregator\FeedHtmlRouteProvider.

Class

FeedHtmlRouteProvider
Provides HTML routes for the feed entity type.

Namespace

Drupal\aggregator

Code

protected function getCanonicalRoute(EntityTypeInterface $entity_type) {
  $route = parent::getCanonicalRoute($entity_type);
  $route
    ->setDefault('_title_controller', '\\Drupal\\aggregator\\Controller\\AggregatorController::feedTitle');
  return $route;
}