diff --git a/core/lib/Drupal/Core/Entity/EntityAccessCheck.php b/core/lib/Drupal/Core/Entity/EntityAccessCheck.php index 9d44998f2f47b279698b8f4ed4432b79c5046f61..341fcc54fbfecbfeb5a48a0fd43afc3214405f3f 100644 --- a/core/lib/Drupal/Core/Entity/EntityAccessCheck.php +++ b/core/lib/Drupal/Core/Entity/EntityAccessCheck.php @@ -17,8 +17,11 @@ class EntityAccessCheck implements AccessInterface { * Checks access to the entity operation on the given route. * * The route's '_entity_access' requirement must follow the pattern - * 'entity_stub_name.operation', where available operations are: - * 'view', 'update', 'create', and 'delete'. + * 'slug.operation'. Typically, the slug is an entity type ID, but it can be + * any slug defined in the route. The route match parameter corresponding to + * the slug is checked to see if it is entity-like, that is: implements + * EntityInterface. Available operations are: 'view', 'update', 'create', and + * 'delete'. * * For example, this route configuration invokes a permissions check for * 'update' access to entities of type 'node': @@ -38,8 +41,6 @@ class EntityAccessCheck implements AccessInterface { * example: * type: entity:{entity_type} * @endcode - * The route match parameter corresponding to the stub name is checked to - * see if it is entity-like i.e. implements EntityInterface. * * @see \Drupal\Core\ParamConverter\EntityConverter * @@ -52,6 +53,8 @@ class EntityAccessCheck implements AccessInterface { * * @return \Drupal\Core\Access\AccessResultInterface * The access result. + * + * @link https://www.drupal.org/docs/8/api/routing-system/parameters-in-routes */ public function access(Route $route, RouteMatchInterface $route_match, AccountInterface $account) { // Split the entity type and the operation.