You are here

protected function GroupRouteProvider::getAddPageRoute in Group 8

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

Gets the add page route.

Built only for entity types that have bundles.

Parameters

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

Return value

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

Overrides DefaultHtmlRouteProvider::getAddPageRoute

File

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

Class

GroupRouteProvider
Provides routes for groups.

Namespace

Drupal\group\Entity\Routing

Code

protected function getAddPageRoute(EntityTypeInterface $entity_type) {
  if ($route = parent::getAddPageRoute($entity_type)) {
    $route
      ->setOption('_group_operation_route', TRUE);
    return $route;
  }
}