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