class EntityAccessCheck contains incorrect and inconsistent example.
/**
* Checks access to the entity operation on the given route.
*
* The route's '_entity_access' requirement must follow the pattern
* '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':
* @code
* pattern: '/foo/{node}/bar'
* requirements:
* _entity_access: 'node.update'
* @endcode
*
* And this will check 'delete' access to a dynamic entity type:
*
* @code
* example.route:
* path: foo/{entity_type}/{example}
* requirements:
* _entity_access: example.delete
* options:
* parameters:
* example:
* type: entity:{entity_type}
* @endcode
*
- pattern is used instead of path
- path is not consistent
- update documentation page
Issue fork drupal-3484799
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
vladimirausComment #4
vladimirausComment #5
vladimirausComment #6
jannakha commentedthanks for the fix!
Comment #7
alexpottBackported to 10.3.x as a docs fix.
Committed and pushed d3ba876d324 to 11.x and 529f579d084 to 11.1.x and 99ca4cf58ce to 11.0.x and e6da6632568 to 10.5.x and 6ea3299f969 to 10.4.x and 8c90792a8d2 to 10.3.x. Thanks!