protected function GroupContentRouteProvider::getEditFormRoute in Group 8
Same name and namespace in other branches
- 2.0.x src/Entity/Routing/GroupContentRouteProvider.php \Drupal\group\Entity\Routing\GroupContentRouteProvider::getEditFormRoute()
Gets the edit-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::getEditFormRoute
File
- src/
Entity/ Routing/ GroupContentRouteProvider.php, line 159
Class
- GroupContentRouteProvider
- Provides routes for group content.
Namespace
Drupal\group\Entity\RoutingCode
protected function getEditFormRoute(EntityTypeInterface $entity_type) {
return parent::getEditFormRoute($entity_type)
->setDefault('_title_callback', '\\Drupal\\group\\Entity\\Controller\\GroupContentController::editFormTitle')
->setRequirement('_group_owns_content', 'TRUE')
->setOption('_group_operation_route', TRUE)
->setOption('parameters', [
'group' => [
'type' => 'entity:group',
],
'group_content' => [
'type' => 'entity:group_content',
],
]);
}