Classes, traits, and interfaces - main - 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 1529
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| TestItemWithSingleDescription | class | Drupal\field_test\Plugin\Field\FieldType | core/ |
Defines the 'test_field_with_single_description' entity field item. | ||||
| TestKernel | class | Drupal\Core\Test | core/ |
Kernel that is only used by mock front controllers. | 6 | |||
| TestLayoutEntityHelperTrait | class | Drupal\Tests\layout_builder\Kernel | core/ |
Test class using the trait. | ||||
| TestLazyPluginCollection | class | Drupal\plugin_test\Plugin | core/ |
Defines a plugin collection which uses fruit plugins. | ||||
| TestLibraryDiscoveryParser | class | Drupal\Tests\Core\Asset | core/ |
Wraps the tested class to mock the external dependencies. | ||||
| TestLoader | class | Drupal\twig_loader_test\Loader | core/ |
A test Twig loader. | 2 | |||
| TestLocalAction | class | Drupal\menu_test\Plugin\Menu\LocalAction | core/ |
Defines a test local action plugin class. | 1 | |||
| TestLocalAction4 | class | Drupal\menu_test\Plugin\Menu\LocalAction | core/ |
Defines a local action plugin with a dynamic title. | 1 | |||
| TestLocalAction5 | class | Drupal\menu_test\Plugin\Menu\LocalAction | core/ |
Defines a local action plugin with a dynamic title from user input. | 1 | |||
| TestLocalActionManager | class | Drupal\Tests\Core\Menu | core/ |
Stub class for testing LocalActionManager. | ||||
| 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/ |
Stub class for testing LocalTaskDefault. | ||||
| 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/ |
Stub class with memory cache implementation for testing. | ||||
| TestMiddleware | class | Drupal\http_kernel_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. | ||||
| TestModalController | class | Drupal\pager_test\Controller | core/ |
Renders a link to open a route in route with a pager in a modal. | ||||
| TestModuleRequiredByThemeHooks | class | Drupal\test_module_required_by_theme\Hook | core/ |
Hook implementations for test_module_required_by_theme. | ||||
| 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 | |||
| TestNodeVisitor | final class | Drupal\sdc_other_node_visitor\Twig\NodeVisitor | core/ |
A node visitor that adds nodes to the Twig template. | 1 | |||
| TestNormalizerBase | class | Drupal\Tests\serialization\Unit\Normalizer | core/ |
Testable class for NormalizerBase. | ||||
| TestNotAnEntityForm | class | Drupal\Tests\Core\Entity | core/ |
Provides a test entity form that doesn't extend EntityForm. | ||||
| TestObject | class | Drupal\Tests\serialization\Unit\Encoder | core/ |
Test class used for the encoding test. | ||||
| 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. | ||||
| TestPageTitleMainContentAndMessagesBlock | class | Drupal\block_test\Plugin\Block | core/ |
Provides a block which includes page title, main content & messages together. | ||||
| TestPathBasedBreadcrumbBuilder | class | Drupal\Tests\system\Unit\Breadcrumbs | core/ |
Helper class for testing purposes only. | ||||
| TestPerComponentEntityDisplay | class | Drupal\Tests\migrate\Unit\destination | core/ |
Test class used for testing per component entity display. | ||||
| TestPerComponentEntityFormDisplay | class | Drupal\Tests\migrate\Unit\destination | core/ |
Test class for testing per component entity form display. | ||||
| TestPermissionCallbacks | class | Drupal\Tests\user\Unit | core/ |
Provider for testing permissions callbacks. | ||||
| TestPhpMailFailure | class | Drupal\system_mail_failure_test\Plugin\Mail | core/ |
Defines a mail sending implementation that always fails. | 1 | |||
| TestPlaceholderingRenderCache | class | Drupal\Tests\Core\Render | core/ |
Class for testing the placeholdering render cache. | ||||
| TestPluginBase | class | Drupal\Tests\views\Kernel\Plugin | core/ |
Helper class for using the PluginBase abstract class. | ||||
| TestPluginDependency | class | Drupal\Tests\Core\Plugin | core/ |
Stub class for testing PluginDependencyTrait. | ||||
| TestPluginForm | class | Drupal\Tests\Core\Plugin | core/ |
Plugin form test class. | ||||
| TestPluginManager | class | Drupal\Tests\Core\Plugin | core/ |
A plugin manager for condition plugins. | 1 |
Pagination
- Previous page
- Page 193
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.