class AccessException

Same name in other branches
  1. 9 core/lib/Drupal/Core/Access/AccessException.php \Drupal\Core\Access\AccessException
  2. 8.9.x core/lib/Drupal/Core/Access/AccessException.php \Drupal\Core\Access\AccessException
  3. 10 core/lib/Drupal/Core/Access/AccessException.php \Drupal\Core\Access\AccessException

An exception thrown for access errors.

Examples could be invalid access callback return values, or invalid access objects being used.

Hierarchy

  • class \Drupal\Core\Access\AccessException extends \Drupal\Core\Access\RuntimeException

Expanded class hierarchy of AccessException

5 files declare their use of AccessException
AccessManagerTest.php in core/tests/Drupal/Tests/Core/Access/AccessManagerTest.php
AdminAccountSwitcher.php in core/lib/Drupal/Core/DefaultContent/AdminAccountSwitcher.php
AdminAccountSwitcherTest.php in core/tests/Drupal/KernelTests/Core/DefaultContent/AdminAccountSwitcherTest.php
LatestRevisionCheck.php in core/modules/content_moderation/src/Access/LatestRevisionCheck.php
WorkspaceAccessException.php in core/modules/workspaces/src/WorkspaceAccessException.php

File

core/lib/Drupal/Core/Access/AccessException.php, line 11

Namespace

Drupal\Core\Access
View source
class AccessException extends \RuntimeException {

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.