protected function GroupRouteProvider::getAddFormRoute in Group 8
Same name and namespace in other branches
- 2.0.x src/Entity/Routing/GroupRouteProvider.php \Drupal\group\Entity\Routing\GroupRouteProvider::getAddFormRoute()
Gets the add-form 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::getAddFormRoute
File
- src/
Entity/ Routing/ GroupRouteProvider.php, line 26
Class
- GroupRouteProvider
- Provides routes for groups.
Namespace
Drupal\group\Entity\RoutingCode
protected function getAddFormRoute(EntityTypeInterface $entity_type) {
if ($route = parent::getAddFormRoute($entity_type)) {
$route
->setOption('_group_operation_route', TRUE);
$route
->setDefault('_controller', '\\Drupal\\group\\Entity\\Controller\\GroupController::addForm');
$route
->setDefault('_title_callback', '\\Drupal\\group\\Entity\\Controller\\GroupController::addFormTitle');
return $route;
}
}