Classes, traits, and interfaces in Drupal 9
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 |
---|---|---|---|---|---|---|---|
AggregatorXSSFormatter | class |
Drupal\ |
core/ |
Plugin implementation of the 'aggregator_xss' formatter. | |||
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. | 7 | 2 | |
AjaxResponseTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Ajax\AjaxResponse @group Ajax | |||
AjaxTest | class |
Drupal\ |
core/ |
Tests AJAX responses. | |||
AjaxTestController | class |
Drupal\ |
core/ |
Provides content for dialog tests. | 3 | ||
AjaxTestDialogForm | class |
Drupal\ |
core/ |
Dummy form for testing DialogRenderer with _form routes. | |||
AjaxTestFocusFirstForm | class |
Drupal\ |
core/ |
Form for testing AJAX FocusFirstCommand. | 1 | ||
AjaxTestForm | class |
Drupal\ |
core/ |
Dummy form for testing DialogRenderer with _form routes. | 1 | ||
AjaxTestImageEffect | class |
Drupal\ |
core/ |
Provides a test effect using Ajax in the configuration form. | |||
AjaxTestMessageCommandForm | class |
Drupal\ |
core/ |
Form for testing AJAX MessageCommand. | 1 | ||
AlertCommand | class |
Drupal\ |
core/ |
AJAX command for a javascript alert box. | 6 | ||
AliasingResourceTypeRepository | class |
Drupal\ |
core/ |
Provides a repository of JSON:API resource types with aliasable field names. | 2 | ||
AliasManager | class |
Drupal\ |
core/ |
The default alias manager implementation. | 3 | 2 | |
AliasManagerInterface | interface |
Drupal\ |
core/ |
Find an alias for a path and vice versa. | 2 | 11 | |
AliasManagerTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\path_alias\AliasManager @group path_alias | |||
AliasPathProcessor | class |
Drupal\ |
core/ |
Processes the inbound path using path alias lookups. | 3 | 2 | |
AliasPathProcessorTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\path_alias\PathProcessor\AliasPathProcessor @group PathProcessor @group path_alias | |||
AliasRepository | class |
Drupal\ |
core/ |
Provides the default path alias lookup operations. | 1 | 1 | 2 |
AliasRepositoryInterface | interface |
Drupal\ |
core/ |
Provides an interface for path alias lookup operations. | 1 | 1 | |
AliasTest | class |
Drupal\ |
core/ |
Tests path alias CRUD and lookup functionality. | |||
AliasWhitelist | class |
Drupal\ |
core/ |
Extends CacheCollector to build the path alias whitelist over time. | 1 | 2 | |
AliasWhitelistInterface | interface |
Drupal\ |
core/ |
Cache the alias whitelist. | 1 | ||
AllowedPackages | class |
Drupal\ |
composer/ |
Determine recursively which packages have been allowed to scaffold files. |