Loading core/lib/Drupal/Core/Entity/EntityAccessCheck.php +7 −4 Original line number Diff line number Diff line Loading @@ -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': Loading @@ -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 * Loading @@ -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. Loading Loading
core/lib/Drupal/Core/Entity/EntityAccessCheck.php +7 −4 Original line number Diff line number Diff line Loading @@ -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': Loading @@ -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 * Loading @@ -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. Loading