Unverified Commit a5c0f164 authored by Lee Rowlands's avatar Lee Rowlands
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)
(cherry picked from commit 48897c3f)
parent dba429a5
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -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.