protected function EntityPermissionsRouteProviderWithCheck::getEntityPermissionsRoute in Drupal 10
Gets the entity permissions route.
Built only for entity types that are bundles of other entity types and define the 'entity-permissions-form' link template.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type.
Return value
\Symfony\Component\Routing\Route|null The generated route, if available.
Overrides EntityPermissionsRouteProvider::getEntityPermissionsRoute
File
- core/
modules/ user/ src/ Entity/ EntityPermissionsRouteProviderWithCheck.php, line 23
Class
- EntityPermissionsRouteProviderWithCheck
- Provides routes for the entity permissions form with a custom access check.
Namespace
Drupal\user\EntityCode
protected function getEntityPermissionsRoute(EntityTypeInterface $entity_type) : ?Route {
$route = parent::getEntityPermissionsRoute($entity_type);
if ($route) {
$route
->setRequirement('_custom_access', '\\Drupal\\user\\Form\\EntityPermissionsForm::access');
}
return $route;
}