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 |
|---|---|---|---|---|---|---|---|---|
| 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\views\Unit\EventSubscriber | core/ |
Provides a test route subscriber. | ||||
| TestRouteSubscriber | class | Drupal\Tests\Core\Routing | core/ |
Provides a callback for route definition. | ||||
| 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. | 2 | |||
| 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. | 7 | 3 | ||
| 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. | ||||
| TestSiteApplication | class | Drupal\TestSite | core/ |
Application wrapper for test site commands. | 1 | |||
| TestSiteApplicationTest | class | Drupal\KernelTests\Scripts | core/ |
Tests core/scripts/test-site.php. | ||||
| TestSiteClaroInstallTestScript | class | Drupal\TestSite | core/ |
Setup file used by TestSiteInstallTestScript. | ||||
| TestSiteConfigurationExcluder | class | Drupal\Tests\package_manager\Kernel\PathExcluder | core/ |
A test version of the site configuration excluder, to expose internals. | ||||
| TestSiteExcluder | final class | Drupal\package_manager\PathExcluder | core/ |
Excludes 'sites/simpletest' from stage operations. | 1 | |||
| TestSiteExcluderTest | class | Drupal\Tests\package_manager\Kernel\PathExcluder | core/ |
Tests Site Excluder. | ||||
| TestSiteInstallCommand | class | Drupal\TestSite\Commands | core/ |
Command to create a test Drupal site. | 1 | |||
| TestSiteInstallTestScript | class | Drupal\TestSite | core/ |
Setup file used by TestSiteApplicationTest. | ||||
| TestSiteMultilingualInstallTestScript | class | Drupal\TestSite | core/ |
Setup file used by TestSiteApplicationTest. | ||||
| TestSiteOliveroInstallTestScript | class | Drupal\TestSite | core/ |
Setup file used by TestSiteInstallTestScript. |
Pagination
- Previous page
- Page 197
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.