Classes, traits, and interfaces in Drupal 10
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
|
Name |
Type | Namespace | Location | Description | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|
| AdminContext | class |
Drupal\ |
core/ |
Provides a helper class to determine whether the route is an admin one. | 5 | 2 | |
| AdminController | class |
Drupal\ |
core/ |
Controller for admin section. | |||
| AdminDemoNegotiator | class |
Drupal\ |
core/ |
Negotiates the theme for the block admin demo page via the URL. | 2 | ||
| AdminHtmlRouteProvider | class |
Drupal\ |
core/ |
Provides HTML routes for entities with administrative add/edit/delete pages. | 2 | 3 | |
| AdminMetaTagTest | class |
Drupal\ |
core/ |
Confirm that the fingerprinting meta tag appears as expected. | |||
| AdminNegotiator | class |
Drupal\ |
core/ |
Sets the active theme on admin pages. | 1 | 2 | |
| AdminNegotiatorTest | class |
Drupal\ |
core/ |
Tests AdminNegotiator class. | |||
| AdminPathConfigEntityConverter | class |
Drupal\ |
core/ |
Makes sure the unmodified ConfigEntity is loaded on admin pages. | 1 | 1 | 2 |
| AdminPathConfigEntityConverter | class |
Drupal\ |
core/ |
Provides a proxy class for \Drupal\Core\ParamConverter\AdminPathConfigEntityConverter. | |||
| AdminPathEntityConverterLanguageTest | class |
Drupal\ |
core/ |
Test administration path based conversion of entities. | 1 | 1 | |
| AdminRouteSubscriber | class |
Drupal\ |
core/ |
Adds the _admin_route option to each admin HTML route. | 1 | 2 | |
| AdminRouteSubscriberTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\system\EventSubscriber\AdminRouteSubscriber @group system | |||
| AdminTest | class |
Drupal\ |
core/ |
Tests output on administrative pages and compact mode functionality. | |||
| AdminUiTest | class |
Drupal\ |
core/ |
Tests for CKEditor 5 in the admin UI. | |||
| AdvancedSettingsForm | class |
Drupal\ |
core/ |
Form builder for the advanced admin settings page. | 1 | ||
| AdvisoriesConfigSubscriber | class |
Drupal\ |
core/ |
Defines a config subscriber for changes to 'system.advisories'. | 2 | ||
| AdvisoriesTestHttpClient | class |
Drupal\ |
core/ |
Provides a decorator service for the 'http_client' service for testing. | 1 | 2 | |
| AdvisoryTestController | class |
Drupal\ |
core/ |
Defines a controller to return JSON for security advisory tests. | |||
| AfterCommand | class |
Drupal\ |
core/ |
An AJAX command for calling the jQuery after() method. | 2 | ||
| Ajax | class |
Drupal\ |
core/ |
Provides a render element for adding Ajax to a render element. | |||
| AjaxBasePageNegotiator | class |
Drupal\ |
core/ |
Defines a theme negotiator that deals with the active theme on ajax requests. | 1 | 2 | |
| AjaxBasePageNegotiatorTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Theme\AjaxBasePageNegotiator @group Theme | |||
| AjaxBlockTest | class |
Drupal\ |
core/ |
Ajax blocks tests. | |||
| AjaxCallbacksTest | class |
Drupal\ |
core/ |
Tests Ajax callbacks on FAPI elements. | |||
| AjaxCommandsTest | class |
Drupal\ |
core/ |
Test coverage for various classes in the \Drupal\Core\Ajax namespace. | |||
| AjaxCssForm | class |
Drupal\ |
core/ |
A form for testing delivery of CSS to CKEditor via AJAX. | 1 | ||
| AjaxCssTest | class |
Drupal\ |
core/ |
Tests delivery of CSS to CKEditor via AJAX. | |||
| AjaxFileManagedMultipleTest | class |
Drupal\ |
core/ |
Tests ajax upload to managed files. | |||
| AjaxFormBlock | class |
Drupal\ |
core/ |
Provides an AJAX form block. | |||
| AjaxFormCacheTest | class |
Drupal\ |
core/ |
Tests the usage of form caching for AJAX forms. | |||
| AjaxFormHelperTrait | trait |
Drupal\ |
core/ |
Provides a helper to for submitting an AJAX form. | 5 | ||
| AjaxFormImageButtonTest | class |
Drupal\ |
core/ |
Tests the Ajax image buttons work with key press events. | |||
| AjaxFormPageCacheTest | class |
Drupal\ |
core/ |
Performs tests on AJAX forms in cached pages. | |||
| AjaxFormsTestAjaxElementsForm | class |
Drupal\ |
core/ |
Form builder: Builds a form that has each FAPI elements triggering a simple Ajax callback. | 1 | ||
| AjaxFormsTestCommandsForm | class |
Drupal\ |
core/ |
Form constructor for the Ajax Command display form. | 1 | ||
| AjaxFormsTestImageButtonForm | class |
Drupal\ |
core/ |
Form builder: Builds a form that has image button with an ajax callback. | 1 | ||
| AjaxFormsTestLazyLoadForm | class |
Drupal\ |
core/ |
Form builder: Builds a form that triggers a simple AJAX callback. | 1 | ||
| AjaxFormsTestSimpleForm | class |
Drupal\ |
core/ |
Form builder: Builds a form that triggers a simple AJAX callback. | 1 | ||
| AjaxFormsTestValidationForm | class |
Drupal\ |
core/ |
Form builder: Builds a form that triggers a simple AJAX callback. | 1 | ||
| AjaxHelperTrait | trait |
Drupal\ |
core/ |
Provides a helper to determine if the current request is via AJAX. | 5 | ||
| AjaxInGroupTest | class |
Drupal\ |
core/ |
Tests that form elements in groups work correctly with AJAX. | |||
| AjaxPageStateTest | class |
Drupal\ |
core/ |
Performs tests for the effects of the ajax_page_state query parameter. | |||
| AjaxRenderer | class |
Drupal\ |
core/ |
Default main content renderer for Ajax requests. | 1 | 2 | |
| AjaxRendererTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Render\MainContent\AjaxRenderer @group Ajax | |||
| AjaxResponse | class |
Drupal\ |
core/ |
JSON response object for AJAX requests. | 1 | 44 | |
| AjaxResponseAttachmentsProcessor | class |
Drupal\ |
core/ |
Processes attachments of AJAX responses. | 2 | ||
| AjaxResponseSubscriber | class |
Drupal\ |
core/ |
Response subscriber to handle AJAX responses. | 6 | 2 | |
| AjaxResponseTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Ajax\AjaxResponse @group Ajax | |||
| AjaxTest | class |
Drupal\ |
core/ |
Tests AJAX responses. | |||
| AjaxTestCommandReturnPromise | class |
Drupal\ |
core/ |
Test Ajax command. | 1 |