Classes, traits, and interfaces - 9.5.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 1523
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| TestLocalActionManager | class | Drupal\Tests\Core\Menu | core/ |
|||||
| TestLocalActionWithConfig | class | Drupal\menu_test\Plugin\Menu\LocalAction | core/ |
Defines a test local action plugin class. | 1 | |||
| TestLocalTaskController | class | Drupal\content_moderation_test_local_task\Controller | core/ |
A test controller. | ||||
| TestLocalTaskDefault | class | Drupal\Tests\Core\Menu | core/ |
|||||
| TestLog | class | Drupal\error_service_test\Logger | core/ |
Throws an exception while logging an exception. | 2 | |||
| TestMailCollector | class | Drupal\Core\Mail\Plugin\Mail | core/ |
Defines a mail backend that captures sent messages in the state system. | 1 | 2 | ||
| TestMailManager | class | Drupal\Tests\Core\Mail | core/ |
Provides a testing version of MailManager with an empty constructor. | ||||
| TestMediaFilterController | class | Drupal\media_test_embed\Controller | core/ |
Controller to allow testing of error handling of Media Embed in text editors. | ||||
| TestMemoryBackend | class | Drupal\Tests\Core\Asset | core/ |
|||||
| TestMiddleware | class | Drupal\httpkernel_test\HttpKernel | core/ |
Provides a test middleware. | 3 | |||
| TestMigrateExecutable | class | Drupal\Tests\migrate\Unit | core/ |
Tests MigrateExecutable. | ||||
| TestMigrateExecutable | class | Drupal\Tests\migrate\Kernel | core/ |
Tests MigrateExecutable. | ||||
| TestMigrateExecutable | class | Drupal\Tests\migrate\Kernel\Plugin | core/ |
MigrateExecutable test class. | ||||
| TestMigration | class | Drupal\Tests\migrate\Unit | core/ |
Defines the TestMigration class. | ||||
| TestMigrationConfigurationTrait | class | Drupal\Tests\migrate_drupal\Unit | core/ |
Test class that uses the trait we are testing. | ||||
| TestMigrationMock | class | Drupal\Tests\migrate\Unit | core/ |
A mock migration plugin. | ||||
| TestMultipleFormController | class | Drupal\block_test\Controller | core/ |
Controller for block_test module. | ||||
| TestMultipleFormsBlock | class | Drupal\block_test\Plugin\Block | core/ |
Provides a block with multiple forms. | ||||
| TestMultiWidthLayoutsTest | class | Drupal\Tests\layout_builder\FunctionalJavascript | core/ |
Test the multi-width layout plugins. | ||||
| TestNodeFormOverride | class | Drupal\media_library_test\Form | core/ |
Override NodeForm to test media library form submission semantics. | 1 | |||
| TestNormalizerBase | abstract class | Drupal\Tests\serialization\Unit\Normalizer | core/ |
Test class for NormalizerBase. | ||||
| TestObject | class | Drupal\Tests\serialization\Unit\Encoder | core/ |
|||||
| TestObjectItem | class | Drupal\field_test\Plugin\Field\FieldType | core/ |
Defines the 'test_object_field' entity field item. | ||||
| TestObjectItemTest | class | Drupal\Tests\field\Kernel | core/ |
Tests the serialization of an object. | ||||
| TestPageDisplayVariantSubscriber | class | Drupal\display_variant_test\EventSubscriber | core/ |
Selects the test page display variant. | 2 | |||
| TestPageTestController | class | Drupal\test_page_test\Controller | core/ |
Controller routines for test_page_test routes. | ||||
| TestParser | class | Drupal\aggregator_test\Plugin\aggregator\parser | core/ |
Defines a Test parser implementation. | ||||
| TestPathBasedBreadcrumbBuilder | class | Drupal\Tests\system\Unit\Breadcrumbs | core/ |
Helper class for testing purposes only. | ||||
| TestPerComponentEntityDisplay | class | Drupal\Tests\migrate\Unit\destination | core/ |
|||||
| TestPerComponentEntityFormDisplay | class | Drupal\Tests\migrate\Unit\destination | core/ |
|||||
| TestPermissionCallbacks | class | Drupal\Tests\user\Unit | core/ |
|||||
| TestPhpMailFailure | class | Drupal\system_mail_failure_test\Plugin\Mail | core/ |
Defines a mail sending implementation that always fails. | 1 | |||
| TestPluginBase | class | Drupal\Tests\views\Kernel\Plugin | core/ |
Helper class for using the PluginBase abstract class. | ||||
| TestPluginDefinition | class | Drupal\KernelTests\Core\Plugin\Context | core/ |
|||||
| TestPluginDependency | class | Drupal\Tests\Core\Plugin | core/ |
|||||
| TestPluginForm | class | Drupal\Tests\Core\Plugin | core/ |
|||||
| TestPluginManager | class | Drupal\Tests\Core\Plugin | core/ |
A plugin manager for condition plugins. | 1 | |||
| TestPluginManager | class | Drupal\plugin_test\Plugin | core/ |
Defines a plugin manager used by Plugin API unit tests. | 1 | |||
| TestPluginManagerWithDefaults | class | Drupal\Tests\Core\Plugin | core/ |
|||||
| TestPluginSettingsBase | class | Drupal\Tests\Core\Field | core/ |
|||||
| TestPreinstallInterface | interface | Drupal\TestSite | core/ |
Allows running code prior to a test site install. | 1 | 1 | ||
| TestPrepareLayout | class | Drupal\layout_builder_element_test\EventSubscriber | core/ |
Provides an event subscriber for testing section storage alteration. | 2 | |||
| TestPrivateService | class | Drupal\services_defaults_test | core/ |
A service to test private flag. | ||||
| TestProcessor | class | Drupal\aggregator_test\Plugin\aggregator\processor | core/ |
Defines a default processor implementation. | ||||
| TestRequirementsTrait | trait | Drupal\Tests | core/ |
Allows test classes to require Drupal modules as dependencies. | 1 | |||
| TestRouteBuilder | class | Drupal\Tests\Core\Routing | core/ |
Extends the core route builder with a setter method for the YAML discovery. | ||||
| TestRouteProvider | class | Drupal\Tests\Core\Entity | core/ |
Provides a test entity route provider. | ||||
| TestRouteProvider | class | Drupal\KernelTests\Core\Routing | core/ |
|||||
| TestRouterInterface | interface | Drupal\Tests\Core\Routing | core/ |
Provides a router interface that also can match requests. | ||||
| TestRouteSubscriber | class | Drupal\Tests\Core\Routing | core/ |
Provides a callback for route definition. |
Pagination
- Previous page
- Page 166
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.