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 |
|---|---|---|---|---|---|---|---|
| TestInjection | class |
Drupal\ |
core/ |
A service that is autowired. | 1 | 1 | |
| TestInjection2 | class |
Drupal\ |
core/ |
A service that is autowired. | 1 | ||
| TestInjectionInterface | interface |
Drupal\ |
core/ |
An interface for a service that is autowired. | 1 | ||
| TestInlineTemplateFormBlock | class |
Drupal\ |
core/ |
Provides a block containing inline template with <form> tag. | |||
| TestInstallStorage | class |
Drupal\ |
core/ |
Tests configuration of profiles, modules and themes. | 2 | ||
| TestInterface | interface |
Drupal\ |
core/ |
A test interface for testing ContainerBuilder::__construct(). | |||
| TestInterface | interface |
Drupal\ |
core/ |
1 | |||
| TestItem | class |
Drupal\ |
core/ |
Defines the 'test_field' entity field item. | 3 | ||
| TestItemTest | class |
Drupal\ |
core/ |
Tests the new entity API for the test field type. | |||
| TestItemWithDependencies | class |
Drupal\ |
core/ |
Defines the 'test_field_with_dependencies' entity field item. | |||
| TestItemWithDependenciesTest | class |
Drupal\ |
core/ |
Tests the new entity API for the test field with dependencies type. | |||
| TestItemWithPreconfiguredOptions | class |
Drupal\ |
core/ |
Defines the 'test_field_with_preconfigured_options' entity field item. | |||
| TestKernel | class |
Drupal\ |
core/ |
Kernel to mock requests to test simpletest. | 2 | ||
| TestLayoutContentFooter | class |
Drupal\ |
core/ |
Provides an annotated layout plugin for field_layout tests. | |||
| TestLayoutEntityHelperTrait | class |
Drupal\ |
core/ |
Test class using the trait. | |||
| TestLayoutMainFooter | class |
Drupal\ |
core/ |
Provides an annotated layout plugin for field_layout tests. | |||
| TestLazyPluginCollection | class |
Drupal\ |
core/ |
Defines a plugin collection which uses fruit plugins. | |||
| TestLibraryDiscoveryParser | class |
Drupal\ |
core/ |
Wraps the tested class to mock the external dependencies. | |||
| TestLoader | class |
Drupal\ |
core/ |
A test Twig loader. | 2 | ||
| TestLocalAction | class |
Drupal\ |
core/ |
Defines a test local action plugin class. | 1 | ||
| TestLocalAction4 | class |
Drupal\ |
core/ |
Defines a local action plugin with a dynamic title. | 1 | ||
| TestLocalAction5 | class |
Drupal\ |
core/ |
Defines a local action plugin with a dynamic title from user input. | 1 | ||
| TestLocalActionManager | class |
Drupal\ |
core/ |
||||
| TestLocalActionWithConfig | class |
Drupal\ |
core/ |
Defines a test local action plugin class. | 1 | ||
| TestLocalTaskController | class |
Drupal\ |
core/ |
A test controller. | |||
| TestLocalTaskDefault | class |
Drupal\ |
core/ |
||||
| TestLog | class |
Drupal\ |
core/ |
Throws an exception while logging an exception. | 2 | ||
| TestMailCollector | class |
Drupal\ |
core/ |
Defines a mail backend that captures sent messages in the state system. | 1 | 2 | |
| TestMailManager | class |
Drupal\ |
core/ |
Provides a testing version of MailManager with an empty constructor. | |||
| TestMediaFilterController | class |
Drupal\ |
core/ |
Controller to allow testing of error handling in drupalmedia plugin.js. | |||
| TestMemoryBackend | class |
Drupal\ |
core/ |
||||
| TestMiddleware | class |
Drupal\ |
core/ |
Provides a test middleware. | 3 | ||
| TestMigrateExecutable | class |
Drupal\ |
core/ |
Tests MigrateExecutable. | |||
| TestMigrateExecutable | class |
Drupal\ |
core/ |
MigrateExecutable test class. | |||
| TestMigrateExecutable | class |
Drupal\ |
core/ |
Tests MigrateExecutable. | |||
| TestMigration | class |
Drupal\ |
core/ |
Defines the TestMigration class. | |||
| TestMigrationMock | class |
Drupal\ |
core/ |
A mock migration plugin. | |||
| TestMultipleFormController | class |
Drupal\ |
core/ |
Controller for block_test module. | |||
| TestMultipleFormsBlock | class |
Drupal\ |
core/ |
Provides a block with multiple forms. | |||
| TestMultiWidthLayoutsTest | class |
Drupal\ |
core/ |
Test the multi-width layout plugins. | |||
| TestNodeFormOverride | class |
Drupal\ |
core/ |
Override NodeForm to test media library form submission semantics. | 1 | ||
| TestNormalizerBase | abstract class |
Drupal\ |
core/ |
Test class for NormalizerBase. | |||
| TestObject | class |
Drupal\ |
core/ |
||||
| TestObjectItem | class |
Drupal\ |
core/ |
Defines the 'test_object_field' entity field item. | |||
| TestObjectItemTest | class |
Drupal\ |
core/ |
Tests the serialization of an object. | |||
| TestPageDisplayVariantSubscriber | class |
Drupal\ |
core/ |
Selects the test page display variant. | 2 | ||
| TestPageTestController | class |
Drupal\ |
core/ |
Controller routines for test_page_test routes. | |||
| TestParser | class |
Drupal\ |
core/ |
Defines a Test parser implementation. | |||
| TestPathBasedBreadcrumbBuilder | class |
Drupal\ |
core/ |
Helper class for testing purposes only. | |||
| TestPerComponentEntityDisplay | class |
Drupal\ |
core/ |