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 |
|---|---|---|---|---|---|---|---|---|
| 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/ |
Plugin manager test class with defaults assigned. | ||||
| TestPluginSettingsBase | class | Drupal\Tests\Core\Field | core/ |
Stub class for testing PluginSettingsBase. | ||||
| TestPluginWithForm | class | Drupal\Tests\Core\Theme\Icon | core/ |
Test class for form. | ||||
| 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. | ||||
| TestProfilerExtension | class | Drupal\sdc_other_node_visitor\Twig\Extension | core/ |
Twig extension to add a test node visitor. | 2 | |||
| TestRequirementsTrait | trait | Drupal\Tests | core/ |
Allows test classes to require Drupal modules as dependencies. | 1 | |||
| TestResponseController | final class | Drupal\http_middleware_test\Controller | core/ |
Controller routines for http_middleware_test routes. | ||||
| TestRouteProvider | class | Drupal\Tests\Core\Entity | core/ |
Provides a test entity route provider. | ||||
| TestRouteProvider | class | Drupal\KernelTests\Core\Routing | core/ |
Stub class for testing RouteProvider. | ||||
| TestRouterInterface | interface | Drupal\Tests\Core\Routing | core/ |
Provides a router interface that also can match requests. | 2 | |||
| TestRouteSubscriber | class | Drupal\Tests\Core\Routing | core/ |
Provides a callback for route definition. | ||||
| TestRouteSubscriber | class | Drupal\Tests\views\Unit\EventSubscriber | core/ |
Provides a test route subscriber. | ||||
| TestRun | class | Drupal\Core\Test | core/ |
Implements an object that tracks execution of a test run. | 3 | |||
| TestRunnerFinishedSubscriber | final class | Drupal\TestTools\Extension\HtmlLogging | core/ |
Event subscriber notifying end of test runner execution to HTML logging. | ||||
| TestRunnerFinishedSubscriber | final class | Drupal\TestTools\Extension\Dump | core/ |
Event subscriber notifying end of test runner execution to HTML logging. | ||||
| TestRunnerKernel | class | Drupal\Core\Test | core/ |
Defines a kernel used for running Functional tests and run-tests.sh. | ||||
| TestRunnerStartedSubscriber | final class | Drupal\TestTools\Extension\HtmlLogging | core/ |
Event subscriber notifying beginning of test runner to HTML logging. | ||||
| TestRunResultsStorageInterface | interface | Drupal\Core\Test | core/ |
Interface describing a test run results storage object. | 1 | 2 | ||
| TestRunTest | class | Drupal\KernelTests\Core\Test | core/ |
Tests Drupal\Core\Test\TestRun. | ||||
| TestSandboxDatabaseUpdatesValidator | class | Drupal\package_manager_test_validation | core/ |
Allows tests to dictate which extensions have staged database updates. | ||||
| TestSandboxManager | class | Drupal\Tests\package_manager\Kernel | core/ |
Defines a stage specifically for testing purposes. | 1 | |||
| TestSearchPage | class | Drupal\Tests\search\Unit | core/ |
Mock for the configured search page entity. | ||||
| TestSectionList | class | Drupal\Tests\layout_builder\Kernel | core/ |
Test item list class for layout section fields. | ||||
| TestSelection | class | Drupal\block_content_test\Plugin\EntityReferenceSelection | core/ |
Test EntityReferenceSelection with conditions on the 'reusable' field. | 1 | |||
| TestService | class | Drupal\decorated_service_test | core/ |
A service class for handling test functionality. | 1 | 3 | ||
| TestService | class | Drupal\services_defaults_test | core/ |
An autowired service to test _defaults. | 2 | |||
| TestService | class | Drupal\autowire_test | core/ |
Service class for managing injected dependencies. | 1 | |||
| TestServiceComplexMethod | class | Drupal\Tests\Core\ProxyBuilder | core/ |
Call used to test a service with a complex method. | ||||
| TestServiceComplexMethod | class | Drupal\Tests\Component\ProxyBuilder | core/ |
Test service with complex method. | ||||
| TestServiceDecorator | class | Drupal\decorated_service_test | core/ |
Decorator for the TestService class. | 1 | 4 | ||
| TestServiceMethodReturnsVoid | class | Drupal\Tests\Component\ProxyBuilder | core/ |
Test service with void returning method. | ||||
| TestServiceMethodWithParameter | class | Drupal\Tests\Component\ProxyBuilder | core/ |
Test service with method without parameter. | ||||
| TestServiceNoMethod | class | Drupal\Tests\Component\ProxyBuilder | core/ |
Test service without methods. | ||||
| TestServiceNoMethod | class | Drupal\Tests\Core\ProxyBuilder | core/ |
Class used to test a service that has no methods. | ||||
| TestServiceNullableTypeHintSelf | class | Drupal\Tests\Component\ProxyBuilder | core/ |
Test service with a nullable self parameter. | ||||
| TestServiceReturnReference | class | Drupal\Tests\Component\ProxyBuilder | core/ |
Test service with method that returns reference. | ||||
| TestServiceSimpleMethod | class | Drupal\Tests\Component\ProxyBuilder | core/ |
Test service with simple method. | ||||
| TestServiceWithChildInterfaces | class | Drupal\Tests\Component\ProxyBuilder | core/ |
Test service that implements test child interface. | ||||
| TestServiceWithInterface | class | Drupal\Tests\Component\ProxyBuilder | core/ |
Test service that implements test interface. | ||||
| TestServiceWithProtectedMethods | class | Drupal\Tests\Component\ProxyBuilder | core/ |
Test service with protected methods. | ||||
| TestServiceWithPublicStaticMethod | class | Drupal\Tests\Component\ProxyBuilder | core/ |
Test service with public static method. | ||||
| TestSessionBag | class | Drupal\session_test\Session | core/ |
Test session container. | 1 | 2 | ||
| TestSessionHandlerProxy | class | Drupal\session_test\Session | core/ |
Provides a test session handler proxy. | 3 | |||
| TestSettingsValidationBlock | class | Drupal\block_test\Plugin\Block | core/ |
Provides a test settings validation block. | ||||
| TestSetupInterface | interface | Drupal\TestSite | core/ |
Allows setting up an environment as part of a test site install. | 6 | 2 | ||
| TestSetupTrait | trait | Drupal\Core\Test | core/ |
Provides a trait for shared test setup functionality. | 3 | |||
| TestSetupTraitTest | class | Drupal\Tests\Core\Test | core/ |
Tests the TestSetupTrait trait. |
Pagination
- Previous page
- Page 194
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.