You are here

protected function GroupTypeRouteProvider::getCollectionRoute in Group 8

Same name and namespace in other branches
  1. 2.0.x src/Entity/Routing/GroupTypeRouteProvider.php \Drupal\group\Entity\Routing\GroupTypeRouteProvider::getCollectionRoute()

Gets the collection 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::getCollectionRoute

File

src/Entity/Routing/GroupTypeRouteProvider.php, line 16

Class

GroupTypeRouteProvider
Provides routes for group types.

Namespace

Drupal\group\Entity\Routing

Code

protected function getCollectionRoute(EntityTypeInterface $entity_type) {

  // @todo Remove this method when https://www.drupal.org/node/2767025 lands.
  if ($route = parent::getCollectionRoute($entity_type)) {
    $route
      ->setDefault('_title', 'Group types');
    $route
      ->setDefault('_title_arguments', []);
    return $route;
  }
}