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 |
|---|---|---|---|---|---|---|---|---|
| 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/ |
#[ConfigAction(id: 'editor:addItemToToolbar', admin_label: new TranslatableMarkup('Add an item to a CKEditor 5 toolbar'), entity_types: [ 'editor', ])] | ||||
| 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/ |
#[ConfigAction(id: 'add_moderation', entity_types: [ 'workflow', ], deriver: AddModerationDeriver::class)] | ||||
| 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/ |
|||||
| AddPermissionsUpdateTest | class | Drupal\Tests\help\Functional | core/ |
Tests help_post_update_add_permissions_to_roles(). | ||||
| 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. | ||||
| AddToAllBundlesConfigActionTest | class | Drupal\Tests\field\Kernel | core/ |
@covers \Drupal\field\Plugin\ConfigAction\AddToAllBundles[[api-linebreak]] | ||||
| AdminAccountSwitcher | final class | Drupal\Core\DefaultContent | core/ |
@internal This API is experimental. | 1 | |||
| AdminAccountSwitcherTest | class | Drupal\KernelTests\Core\DefaultContent | core/ |
@covers \Drupal\Core\DefaultContent\AdminAccountSwitcher[[api-linebreak]] @group DefaultContent | ||||
| AdminAjaxTest | class | Drupal\Tests\views_ui\FunctionalJavascript | core/ |
Tests the admin UI AJAX interactions. | ||||
| AdminContext | class | Drupal\Core\Routing | core/ |
Provides a helper class to determine whether the route is an admin one. | 5 | 2 | ||
| AdminController | class | Drupal\system\Controller | core/ |
Controller for admin section. | ||||
| AdminDemoNegotiator | class | Drupal\block\Theme | core/ |
Negotiates the theme for the block admin demo page via the URL. | 2 | |||
| AdminHtmlRouteProvider | class | Drupal\Core\Entity\Routing | core/ |
Provides HTML routes for entities with administrative add/edit/delete pages. | 2 | 3 | ||
| AdminMetaTagTest | class | Drupal\Tests\system\Functional\System | core/ |
Confirm that the fingerprinting meta tag appears as expected. | ||||
| AdminNegotiator | class | Drupal\user\Theme | core/ |
Sets the active theme on admin pages. | 1 | 2 | ||
| AdminNegotiatorTest | class | Drupal\Tests\user\Unit\Theme | core/ |
Tests AdminNegotiator class. | ||||
| AdminPathConfigEntityConverter | class | Drupal\Core\ParamConverter | core/ |
Makes sure the unmodified ConfigEntity is loaded on admin pages. | 1 | 1 | 2 | |
| AdminPathConfigEntityConverter | class | Drupal\Core\ProxyClass\ParamConverter | core/ |
Provides a proxy class for \Drupal\Core\ParamConverter\AdminPathConfigEntityConverter. | ||||
| AdminPathEntityConverterLanguageTest | class | Drupal\Tests\language\Functional | core/ |
Test administration path based conversion of entities. | 1 | 1 | ||
| AdminRouteSubscriber | class | Drupal\system\EventSubscriber | core/ |
Adds the _admin_route option to each admin HTML route. | 1 | 2 | ||
| AdminRouteSubscriberTest | class | Drupal\Tests\system\Unit\Routing | core/ |
@coversDefaultClass \Drupal\system\EventSubscriber\AdminRouteSubscriber[[api-linebreak]] @group system | ||||
| AdminTest | class | Drupal\Tests\system\Functional\System | core/ |
Tests output on administrative pages and compact mode functionality. | ||||
| AdminUiTest | class | Drupal\Tests\ckeditor5\FunctionalJavascript | core/ |
Tests for CKEditor 5 in the admin UI. | ||||
| AdvancedSettingsForm | class | Drupal\views_ui\Form | core/ |
Form builder for the advanced admin settings page. | 1 | |||
| AdvisoriesConfigSubscriber | class | Drupal\system\EventSubscriber | core/ |
Defines a config subscriber for changes to 'system.advisories'. | 2 | |||
| AdvisoryTestClientMiddleware | class | Drupal\advisory_feed_test | core/ |
Overrides the User-Agent HTTP header for outbound HTTP requests. | 1 | 2 | ||
| AdvisoryTestController | class | Drupal\advisory_feed_test\Controller | core/ |
Defines a controller to return JSON for security advisory tests. | ||||
| AfterCommand | class | Drupal\Core\Ajax | core/ |
An AJAX command for calling the jQuery after() method. | 2 | |||
| Ajax | in drupal:10.1.0 and is removed from drupal:11.0.0. Return an \Drupal\Core\Ajax\AjaxResponse instead. |
class | Drupal\Core\Render\Element | core/ |
Provides a render element for adding Ajax to a render element. | |||
| AjaxBasePageNegotiator | class | Drupal\Core\Theme | core/ |
Defines a theme negotiator that deals with the active theme on ajax requests. | 1 | 2 | ||
| AjaxBasePageNegotiatorTest | class | Drupal\Tests\Core\Theme | core/ |
@coversDefaultClass \Drupal\Core\Theme\AjaxBasePageNegotiator[[api-linebreak]] @group Theme | ||||
| AjaxBlockTest | class | Drupal\Tests\layout_builder\FunctionalJavascript | core/ |
Ajax blocks tests. | ||||
| AjaxCallbacksTest | class | Drupal\FunctionalJavascriptTests\Ajax | core/ |
Tests Ajax callbacks on FAPI elements. | ||||
| AjaxCommandsTest | class | Drupal\Tests\Core\Ajax | core/ |
Test coverage for various classes in the \Drupal\Core\Ajax namespace. | ||||
| AjaxFileManagedMultipleTest | class | Drupal\Tests\file\FunctionalJavascript | core/ |
Tests ajax upload to managed files. | ||||
| AjaxFormBlock | class | Drupal\ajax_forms_test\Plugin\Block | core/ |
Provides an AJAX form block. | ||||
| AjaxFormCacheTest | class | Drupal\FunctionalJavascriptTests\Ajax | core/ |
Tests the usage of form caching for AJAX forms. |
Pagination
- Previous page
- Page 3
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.