Unverified Commit 6ea3299f authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3484799 by vladimiraus: EntityAccessCheck documentation contains errors

(cherry picked from commit d3ba876d)
parent c8034c72
Loading
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -25,17 +25,21 @@ class EntityAccessCheck implements AccessInterface {
   *
   * For example, this route configuration invokes a permissions check for
   * 'update' access to entities of type 'node':
   *
   * @code
   * pattern: '/foo/{node}/bar'
   * example.route:
   *   path: '/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}
   *   path: '/foo/{entity_type}/{example}'
   *   requirements:
   *     _entity_access: example.delete
   *     _entity_access: 'example.delete'
   *   options:
   *     parameters:
   *       example:
@@ -47,7 +51,7 @@ class EntityAccessCheck implements AccessInterface {
   * @param \Symfony\Component\Routing\Route $route
   *   The route to check against.
   * @param \Drupal\Core\Routing\RouteMatchInterface $route_match
   *   The parametrized route
   *   The parametrized route.
   * @param \Drupal\Core\Session\AccountInterface $account
   *   The currently logged in account.
   *
+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@
 *
 * // *.routing.yml file
 * my.route.name:
 *   pattern: '/something'
 *   path: '/something'
 *   defaults:
 *     _title: 'May'
 *     _title_context: 'Long month name'
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
 *
 * Example:
 *
 * pattern: '/some/{view}/and/{bar}'
 * path: '/some/{view}/and/{bar}'
 * options:
 *   parameters:
 *     view:
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ class WorkflowStateTransitionOperationsAccessCheck implements AccessInterface {
   * "/test-workflow/foo-state/delete" the 'delete-state:foo-state' operation
   * will be checked:
   * @code
   * pattern: '/{workflow}/{workflow_state}/delete'
   * path: '/{workflow}/{workflow_state}/delete'
   * requirements:
   *   _workflow_access: 'delete-state'
   * @endcode