Classes, traits, and interfaces - 11.x - drupal
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 1531
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| 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 | 397 | ||
| AccountPermissionsCacheContext | class | Drupal\Core\Cache\Context | core/ |
The account permission cache context for "per permission" caching. | 2 | |||
| AccountProxy | class | Drupal\Core\Session | core/ |
A proxied implementation of AccountInterface. | 1 | 2 | ||
| AccountProxyInterface | interface | Drupal\Core\Session | core/ |
Defines an interface for a service which has the current account stored. | 1 | 14 | ||
| AccountProxyTest | class | Drupal\Tests\Core\Session | core/ |
Tests Drupal\Core\Session\AccountProxy. | ||||
| 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. | 3 | 1 | ||
| AccountSwitcher | class | Drupal\Core\Session | core/ |
An implementation of AccountSwitcherInterface. | 2 | |||
| AccountSwitcherInterface | interface | Drupal\Core\Session | core/ |
Defines an interface for a service for safe account switching. | 2 | 12 | ||
| AccountSwitcherTest | class | Drupal\KernelTests\Core\Session | core/ |
Test case for account switching. | ||||
| AccountTakeoverGadgetChainTest | class | Drupal\KernelTests\Core\User | core/ |
Tests protection against SA-CORE-2024-007 Gadget Chain. | ||||
| Action | class | Drupal\Core\Action\Attribute | core/ |
Defines an Action attribute object. | 21 | |||
| Action | class | Drupal\Core\Annotation | core/ |
Defines an Action annotation object. | ||||
| Action | class | Drupal\system\Entity | core/ |
Defines the configured action entity. | 14 | |||
| Action | class | Drupal\system\Plugin\migrate\source | core/ |
Drupal action source from database. | 1 | |||
| ActionBase | abstract class | Drupal\Core\Action | core/ |
Provides a base implementation for an Action plugin. | 10 | 9 | ||
| 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 | 2 | 1 | |
| ActionJsonAnonTest | class | Drupal\Tests\system\Functional\Rest | core/ |
Tests Action Json Anon. | ||||
| ActionJsonBasicAuthTest | class | Drupal\Tests\system\Functional\Rest | core/ |
Tests Action Json Basic Auth. | ||||
| ActionJsonCookieTest | class | Drupal\Tests\system\Functional\Rest | core/ |
Tests Action Json Cookie. | ||||
| ActionManager | class | Drupal\Core\Action | core/ |
Provides an Action plugin manager. | 2 | |||
| ActionMethod | final class | Drupal\Core\Config\Action\Attribute | core/ |
@internal This API is experimental. | 17 | |||
| ActionMethodAttributeTest | class | Drupal\Tests\Core\Config\Action | core/ |
Tests Drupal\Core\Config\Action\Attribute\ActionMethod. | ||||
| ActionPluginCollection | class | Drupal\Core\Action | core/ |
Provides a container for lazily loading Action plugins. | 1 | |||
| ActionResourceTestBase | abstract class | Drupal\Tests\system\Functional\Rest | core/ |
Resource test base for the action entity. | 6 | |||
| Actions | class | Drupal\Core\Render\Element | core/ |
Provides a wrapper element to group one or more buttons in a form. | 1 | |||
| ActionsTest | class | Drupal\KernelTests\Core\Render\Element | core/ |
Tests Drupal\Core\Render\Element\Actions. | ||||
| ActionTest | class | Drupal\Tests\system\Kernel\Action | core/ |
Tests action plugins. | ||||
| ActionTest | class | Drupal\Tests\system\Kernel\Plugin\migrate\source | core/ |
Tests actions source plugin. | ||||
| ActionTest | class | Drupal\Tests\jsonapi\Functional | core/ |
JSON:API integration test for the "Action" config entity type. | ||||
| ActionValidationTest | class | Drupal\Tests\system\Kernel\Entity | core/ |
Tests validation of action entities. | ||||
| ActionXmlAnonTest | class | Drupal\Tests\system\Functional\Rest | core/ |
Tests Action Xml Anon. | ||||
| ActionXmlBasicAuthTest | class | Drupal\Tests\system\Functional\Rest | core/ |
Tests Action Xml Basic Auth. | ||||
| ActionXmlCookieTest | class | Drupal\Tests\system\Functional\Rest | core/ |
Tests Action Xml Cookie. | ||||
| ActiveFixtureManipulator | final class | Drupal\fixture_manipulator | core/ |
A fixture manipulator for the active directory. | 15 | |||
| ActiveLinkResponseFilter | class | Drupal\Core\EventSubscriber | core/ |
Subscribes to filter HTML responses, to set attributes on active links. | 1 | 2 | ||
| ActiveLinkResponseFilterTest | class | Drupal\Tests\Core\EventSubscriber | core/ |
Tests Drupal\Core\EventSubscriber\ActiveLinkResponseFilter. | ||||
| ActiveLinkTest | class | Drupal\Tests\system\FunctionalJavascript | core/ |
Tests active link JS behavior. | ||||
| ActiveTheme | class | Drupal\Core\Theme | core/ |
Defines a theme and its information needed at runtime. | 5 | |||
| ActiveWorkspaceCheck | class | Drupal\workspaces\Access | core/ |
Determines access to routes based on the presence of an active workspace. | 1 | 2 | ||
| ActiveWorkspaceCheckTest | class | Drupal\Tests\workspaces\Unit | core/ |
Tests Drupal\workspaces\Access\ActiveWorkspaceCheck. | ||||
| ActiveWorkspaceTestForm | class | Drupal\workspaces_test\Form | core/ |
Form for testing the active workspace. | 1 | 1 | ||
| ActiveWorkspaceUpdateTest | class | Drupal\Tests\workspaces\Functional\UpdateSystem | core/ |
Tests that there is no active workspace during database updates. | ||||
| AddBlockForm | class | Drupal\layout_builder\Form | core/ |
Provides a form to add a block. | 1 | |||
| AddComponent | final class | Drupal\layout_builder\Plugin\ConfigAction | core/ |
Adds a component to a layout builder section. | 1 | |||
| AddComponentDeriver | final class | Drupal\layout_builder\Plugin\ConfigAction\Deriver | core/ |
@internal This API is experimental. | 2 | |||
| AddComponentTest | class | Drupal\Tests\layout_builder\Kernel\Plugin\ConfigAction | core/ |
Tests that `addComponentToLayout` config action. | ||||
| AddCssCommand | class | Drupal\Core\Ajax | core/ |
An AJAX command for adding css to the page via ajax. | 3 |
Pagination
- Previous page
- Page 2
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.