Classes, traits, and interfaces - Drupal 11.1.x - Drupal Core
Primary tabs
Introduction to classes
A lot of the PHP code in Drupal is object oriented (OO), making use of PHP classes, interfaces, and traits. See the Objected-oriented programming conventions for more information.
See also
Objected-oriented programming conventions
File
-
core/
core.api.php, line 1518
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
AccessException | class | Drupal\Core\Access | core/ |
An exception thrown for access errors. | 1 | 3 | ||
AccessGroupAnd | class | Drupal\block_content\Access | core/ |
An access group where all the dependencies must be allowed. | ||||
AccessHookMenuSniff | class | DrupalPractice\Sniffs\FunctionDefinitions | vendor/ |
Checks that there are no undocumented open access callbacks in hook_menu(). | ||||
AccessibleInterface | interface | Drupal\Core\Access | core/ |
Interface for checking access. | 8 | 13 | ||
AccessInterface | interface | Drupal\Core\Routing\Access | core/ |
An access check service determines access rules for particular routes. | 33 | 34 | ||
AccessManager | class | Drupal\Core\Access | core/ |
Attaches access check services to routes and runs them on request. | ||||
AccessManagerInterface | interface | Drupal\Core\Access | core/ |
Provides an interface for attaching and running access check services. | 1 | 17 | ||
AccessPluginBase | abstract class | Drupal\views\Plugin\views\access | core/ |
The base plugin to handle access control. | 3 | 2 | ||
AccessPolicyBase | abstract class | Drupal\Core\Session | core/ |
Base class for access policies. | 3 | 1 | ||
AccessPolicyInterface | interface | Drupal\Core\Session | core/ |
Defines the access policy interface. | 1 | |||
AccessPolicyProcessor | class | Drupal\Core\Session | core/ |
Processes access policies into permissions for an account. | ||||
AccessPolicyProcessorInterface | interface | Drupal\Core\Session | core/ |
Processes all added access policies until the full permissions are built. | 1 | |||
AccessPolicyScopeException | class | Drupal\Core\Session | core/ |
An exception thrown when permissions are returned for the wrong scope. | ||||
AccessResult | abstract class | Drupal\Core\Access | core/ |
Value object for passing an access result with cacheability metadata. | 3 | 130 | ||
AccessResultAllowed | class | Drupal\Core\Access | core/ |
Value object indicating an allowed access result, with cacheability metadata. | 1 | |||
AccessResultConditionRule | final class | mglaman\PHPStanDrupal\Rules\Drupal | vendor/ |
@implements Rule<Node\Expr\StaticCall> | ||||
AccessResultForbidden | class | Drupal\Core\Access | core/ |
Value object indicating a forbidden access result, with cacheability metadata. | ||||
AccessResultInterface | interface | Drupal\Core\Access | core/ |
Interface for access result value objects. | 2 | 20 | ||
AccessResultNeutral | class | Drupal\Core\Access | core/ |
Value object indicating a neutral access result, with cacheability metadata. | ||||
AccessResultReasonInterface | interface | Drupal\Core\Access | core/ |
Interface for access result value objects with stored reason for developers. | 2 | 9 | ||
AccessRouteAlterSubscriber | class | Drupal\system\EventSubscriber | core/ |
Alters routes to add necessary requirements. | 2 | |||
AccountEvents | final class | Drupal\Core\Session | core/ |
Defines events for the account system. | 1 | |||
AccountForm | abstract class | Drupal\user | core/ |
Form controller for the user account forms. | 2 | |||
AccountInterface | interface | Drupal\Core\Session | core/ |
Defines an account interface which represents the current user. | 3 | 266 | ||
AccountPermissionsCacheContext | class | Drupal\Core\Cache\Context | core/ |
Defines the AccountPermissionsCacheContext service, for "per permission" caching. | ||||
AccountProxy | class | Drupal\Core\Session | core/ |
A proxied implementation of AccountInterface. | ||||
AccountProxyInterface | interface | Drupal\Core\Session | core/ |
Defines an interface for a service which has the current account stored. | 1 | 10 | ||
AccountSetEvent | final class | Drupal\Core\Session | core/ |
Event fired when an account is set for the current session. | ||||
AccountSettingsForm | class | Drupal\user | core/ |
Configure user settings for this site. | 1 | |||
AccountSwitcher | class | Drupal\Core\Session | core/ |
An implementation of AccountSwitcherInterface. | ||||
AccountSwitcherInterface | interface | Drupal\Core\Session | core/ |
Defines an interface for a service for safe account switching. | 2 | 6 | ||
Action | class | Drupal\system\Entity | core/ |
Defines the configured action entity. | 1 | |||
Action | class | Drupal\Core\Action\Attribute | core/ |
Defines an Action attribute object. | 17 | |||
Action | class | Drupal\system\Plugin\migrate\source | core/ |
Drupal action source from database. | ||||
Action | class | Drupal\Core\Annotation | core/ |
Defines an Action annotation object. | ||||
ActionBase | abstract class | Drupal\Core\Action | core/ |
Provides a base implementation for an Action plugin. | 6 | 5 | ||
ActionConfigEntityInterface | interface | Drupal\system | core/ |
Provides an interface defining an action entity. | 1 | 2 | ||
ActionInterface | interface | Drupal\Core\Action | core/ |
Provides an interface for an Action plugin. | 1 | 1 | ||
ActionManager | class | Drupal\Core\Action | core/ |
Provides an Action plugin manager. | ||||
ActionMethod | final class | Drupal\Core\Config\Action\Attribute | core/ |
@internal This API is experimental. | 13 | |||
ActionPluginCollection | class | Drupal\Core\Action | core/ |
Provides a container for lazily loading Action plugins. | 1 | |||
Actions | class | Drupal\Core\Render\Element | core/ |
Provides a wrapper element to group one or more buttons in a form. | ||||
ActiveAndStagingDirsAreDifferent | final class | PhpTuf\ComposerStager\Internal\Precondition\Service | vendor/ |
@package Precondition | 2 | |||
ActiveAndStagingDirsAreDifferentInterface | interface | PhpTuf\ComposerStager\API\Precondition\Service | vendor/ |
Asserts that the active and staging directories are different. | 1 | 2 | ||
ActiveDirExists | final class | PhpTuf\ComposerStager\Internal\Precondition\Service | vendor/ |
@package Precondition | 2 | |||
ActiveDirExistsInterface | interface | PhpTuf\ComposerStager\API\Precondition\Service | vendor/ |
Asserts that the active directory exists. | 1 | 2 | ||
ActiveDirIsReady | final class | PhpTuf\ComposerStager\Internal\Precondition\Service | vendor/ |
@package Precondition | 2 | |||
ActiveDirIsReadyInterface | interface | PhpTuf\ComposerStager\API\Precondition\Service | vendor/ |
Asserts that the active directory is ready for use. | 1 | 2 | ||
ActiveDirIsWritable | final class | PhpTuf\ComposerStager\Internal\Precondition\Service | vendor/ |
@package Precondition | 2 | |||
ActiveDirIsWritableInterface | interface | PhpTuf\ComposerStager\API\Precondition\Service | vendor/ |
Asserts that the active directory exists. | 1 | 2 |