function EntityPermissionsRouteProviderWithCheck::getEntityPermissionsRoute
Same name and namespace in other branches
- 9 core/modules/user/src/Entity/EntityPermissionsRouteProviderWithCheck.php \Drupal\user\Entity\EntityPermissionsRouteProviderWithCheck::getEntityPermissionsRoute()
- 11.x core/modules/user/src/Entity/EntityPermissionsRouteProviderWithCheck.php \Drupal\user\Entity\EntityPermissionsRouteProviderWithCheck::getEntityPermissionsRoute()
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.