Classes, traits, and interfaces - 10.3.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 1518
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
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. | ||||
Action | class | Drupal\system\Entity | core/ |
Defines the configured action entity. | 23 | |||
Action | class | Drupal\system\Plugin\migrate\source | core/ |
Drupal action source from database. | 1 | |||
Action | class | Drupal\Core\Action\Attribute | core/ |
Defines an Action attribute object. | 25 | |||
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. | 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/ |
@group Action | ||||
ActionJsonBasicAuthTest | class | Drupal\Tests\system\Functional\Rest | core/ |
@group Action | ||||
ActionJsonCookieTest | class | Drupal\Tests\system\Functional\Rest | core/ |
@group Action | ||||
ActionManager | class | Drupal\Core\Action | core/ |
Provides an Action plugin manager. | 2 | 2 | ||
ActionMethod | final class | Drupal\Core\Config\Action\Attribute | core/ |
@internal This API is experimental. | 10 | |||
ActionPluginCollection | class | Drupal\Core\Action | core/ |
Provides a container for lazily loading Action plugins. | 1 | |||
ActionResourceTestBase | abstract class | Drupal\Tests\system\Functional\Rest | core/ |
6 | ||||
Actions | class | Drupal\Core\Render\Element | core/ |
Provides a wrapper element to group one or more buttons in a form. | ||||
ActionsTest | class | Drupal\KernelTests\Core\Render\Element | core/ |
@coversDefaultClass \Drupal\Core\Render\Element\Actions[[api-linebreak]] @group Render | ||||
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/ |
@group Action | ||||
ActionXmlBasicAuthTest | class | Drupal\Tests\system\Functional\Rest | core/ |
@group Action | ||||
ActionXmlCookieTest | class | Drupal\Tests\system\Functional\Rest | core/ |
@group Action | ||||
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/ |
@coversDefaultClass \Drupal\Core\EventSubscriber\ActiveLinkResponseFilter[[api-linebreak]] @group EventSubscriber | ||||
ActiveTheme | class | Drupal\Core\Theme | core/ |
Defines a theme and its information needed at runtime. | 6 | |||
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/ |
@coversDefaultClass \Drupal\workspaces\Access\ActiveWorkspaceCheck[[api-linebreak]] | ||||
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 | |||
AddCssCommand | class | Drupal\Core\Ajax | core/ |
An AJAX command for adding css to the page via ajax. | 3 | |||
AddedStylesheetsTest | class | Drupal\Tests\ckeditor5\Functional | core/ |
Test the ckeditor5-stylesheets theme config property. | ||||
AddFeedTest | class | Drupal\Tests\system\Kernel\Common | core/ |
Make sure that attaching feeds works correctly with various constructs. | ||||
AddFormBase | abstract class | Drupal\media_library\Form | core/ |
Provides a base class for creating media items from within the media library. | 3 | 1 | ||
AddHandler | class | Drupal\views_ui\Form\Ajax | core/ |
Provides a form for adding an item in the Views UI. | ||||
AddItemToToolbar | final class | Drupal\ckeditor5\Plugin\ConfigAction | core/ |
|||||
AddItemToToolbarConfigActionTest | class | Drupal\Tests\ckeditor5\Kernel\ConfigAction | core/ |
@covers \Drupal\ckeditor5\Plugin\ConfigAction\AddItemToToolbar[[api-linebreak]] @group ckeditor5 @group Recipe | ||||
AddJsCommand | class | Drupal\Core\Ajax | core/ |
An AJAX command for adding JS to the page via AJAX. | 1 | |||
AddModeration | final class | Drupal\content_moderation\Plugin\ConfigAction | core/ |
|||||
AddModerationConfigActionTest | class | Drupal\Tests\content_moderation\Kernel\ConfigAction | core/ |
@covers \Drupal\content_moderation\Plugin\ConfigAction\AddModeration[[api-linebreak]] @covers \Drupal\content_moderation\Plugin\ConfigAction\AddModerationDeriver[[api-linebreak]] @group content_moderation @group Recipe | ||||
AddModerationDeriver | final class | Drupal\content_moderation\Plugin\ConfigAction | core/ |
|||||
AddRoleUser | class | Drupal\user\Plugin\Action | core/ |
Adds a role to a user. | 1 | |||
AddRoleUserTest | class | Drupal\Tests\user\Unit\Plugin\Action | core/ |
@coversDefaultClass \Drupal\user\Plugin\Action\AddRoleUser[[api-linebreak]] @group user | ||||
AddSectionController | class | Drupal\layout_builder\Controller | core/ |
Defines a controller to add a new section. | ||||
AddToAllBundles | final class | Drupal\field\Plugin\ConfigAction | core/ |
Adds a field to all bundles of its target entity type. |
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.