Unverified Commit 48897c3f authored by larowlan's avatar larowlan
Browse files

Issue #2821009 by ZeiP, quietone, Dinesh18, shashikant_chauhan, chx, joachim,...

Issue #2821009 by ZeiP, quietone, Dinesh18, shashikant_chauhan, chx, joachim, Berdir, tim.plunkett, Lendude: unclear terminology in EntityAccessCheck::access()

(cherry picked from commit c9f344e4)
parent c6d0179b
......@@ -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.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment