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 |
|---|---|---|---|---|---|---|---|---|
| TestRouteSubscriber | class | Drupal\Tests\views\Unit\EventSubscriber | core/ |
Provides a test route subscriber. | ||||
| TestRunnerKernel | class | Drupal\Core\Test | core/ |
Kernel for run-tests.sh. | 2 | |||
| TestRunnerKernelTest | class | Drupal\Tests\Core\Test | core/ |
@coversDefaultClass \Drupal\Core\Test\TestRunnerKernel[[api-linebreak]] @runTestsInSeparateProcesses @preserveGlobalState disabled @group Test @group simpletest | ||||
| TestSearchPage | class | Drupal\Tests\search\Unit | core/ |
|||||
| TestSectionList | class | Drupal\Tests\layout_builder\Kernel | core/ |
|||||
| 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/ |
1 | 3 | |||
| TestService | class | Drupal\services_defaults_test | core/ |
An autowired service to test _defaults. | 2 | |||
| TestService | class | Drupal\autowire_test | core/ |
1 | ||||
| TestServiceComplexMethod | class | Drupal\Tests\Component\ProxyBuilder | core/ |
|||||
| TestServiceComplexMethod | class | Drupal\Tests\Core\ProxyBuilder | core/ |
|||||
| TestServiceDecorator | class | Drupal\decorated_service_test | core/ |
1 | 4 | |||
| TestServiceMethodReturnsVoid | class | Drupal\Tests\Component\ProxyBuilder | core/ |
|||||
| TestServiceMethodWithParameter | class | Drupal\Tests\Component\ProxyBuilder | core/ |
|||||
| TestServiceNoMethod | class | Drupal\Tests\Component\ProxyBuilder | core/ |
|||||
| TestServiceNoMethod | class | Drupal\Tests\Core\ProxyBuilder | core/ |
|||||
| TestServiceNullableTypehintSelf | class | Drupal\Tests\Component\ProxyBuilder | core/ |
|||||
| TestServiceReturnReference | class | Drupal\Tests\Component\ProxyBuilder | core/ |
|||||
| TestServiceSimpleMethod | class | Drupal\Tests\Component\ProxyBuilder | core/ |
|||||
| TestServiceWithChildInterfaces | class | Drupal\Tests\Component\ProxyBuilder | core/ |
|||||
| TestServiceWithInterface | class | Drupal\Tests\Component\ProxyBuilder | core/ |
|||||
| TestServiceWithProtectedMethods | class | Drupal\Tests\Component\ProxyBuilder | core/ |
|||||
| TestServiceWithPublicStaticMethod | class | Drupal\Tests\Component\ProxyBuilder | core/ |
|||||
| 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. | 3 | 1 | ||
| 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\Tests\Scripts | core/ |
Tests core/scripts/test-site.php. | ||||
| 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. | ||||
| TestSiteReleaseLocksCommand | class | Drupal\TestSite\Commands | core/ |
Command to release all test site database prefix locks. | 1 | |||
| TestSiteTearDownCommand | class | Drupal\TestSite\Commands | core/ |
Command to tear down a test Drupal site. | 1 | |||
| TestSiteUserLoginCommand | class | Drupal\TestSite\Commands | core/ |
Command to generate a login link for the test site. | 1 | |||
| TestSkipRowProcess | class | Drupal\migrate_prepare_row_test\Plugin\migrate\process | core/ |
Provides a testing process plugin that skips rows. | ||||
| TestSqlBase | class | Drupal\Tests\migrate\Kernel | core/ |
A dummy source to help with testing SqlBase. | ||||
| TestSqlBase | class | Drupal\Tests\migrate\Unit | core/ |
Creates a base source class for SQL migration testing. | ||||
| TestSqlContentDefaultTableMapping | class | Drupal\Tests\Core\Entity\Sql | core/ |
Extends DefaultTableMapping to allow calling its protected methods. | ||||
| TestSqlIdMap | class | Drupal\Tests\migrate\Unit | core/ |
Defines a SQL ID map for use in tests. | 1 | 1 | ||
| TestStateBasedSectionStorage | class | Drupal\layout_builder_test\Plugin\SectionStorage | core/ |
Provides a test section storage that is controlled by state. | ||||
| TestStatementInterface | interface | Drupal\Tests\views\Unit\Plugin\pager | core/ |
Creates StatementInterface for testing. | ||||
| TestStatus | class | Drupal\Core\Test | core/ |
Consolidates test result status information. | 1 | |||
| TestStorage | class | Drupal\Tests\Core\Config | core/ |
Provides a test implementation of \Drupal\Core\Config\StorageInterface. | ||||
| TestSuiteBase | abstract class | Drupal\Tests\TestSuites | core/ |
Base class for Drupal test suites. | 6 | 1 | ||
| TestSuiteBaseTest | class | Drupal\Tests\Core\Test | core/ |
@coversDefaultClass \Drupal\Tests\TestSuites\TestSuiteBase[[api-linebreak]] | ||||
| TestSystemLoggerChannel | final class | Drupal\advisory_feed_test | core/ |
Provides a decorator for the 'logger.channel.system' service for testing. | 2 |
Pagination
- Previous page
- Page 167
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.