public function GroupContentRouteProvider::getRoutes in Group 2.0.x
Same name and namespace in other branches
- 8 src/Entity/Routing/GroupContentRouteProvider.php \Drupal\group\Entity\Routing\GroupContentRouteProvider::getRoutes()
Provides routes for entities.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type
Return value
\Symfony\Component\Routing\RouteCollection|\Symfony\Component\Routing\Route[] Returns a route collection or an array of routes keyed by name, like route_callbacks inside 'routing.yml' files.
Overrides DefaultHtmlRouteProvider::getRoutes
File
- src/
Entity/ Routing/ GroupContentRouteProvider.php, line 17
Class
- GroupContentRouteProvider
- Provides routes for group content.
Namespace
Drupal\group\Entity\RoutingCode
public function getRoutes(EntityTypeInterface $entity_type) {
$collection = parent::getRoutes($entity_type);
if ($create_page_route = $this
->getCreatePageRoute($entity_type)) {
$collection
->add("entity.group_content.create_page", $create_page_route);
}
if ($create_form_route = $this
->getCreateFormRoute($entity_type)) {
$collection
->add("entity.group_content.create_form", $create_form_route);
}
return $collection;
}