Classes, traits, and interfaces - 10.3.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 1518
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| 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. | 4 | 1 | ||
| TestSetupTrait | trait | Drupal\Core\Test | core/ |
Provides a trait for shared test setup functionality. | 4 | |||
| TestSetupTraitTest | class | Drupal\Tests\Core\Test | core/ |
Tests the TestSetupTrait trait. | ||||
| TestSetupTraitTest | class | Drupal\KernelTests\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. | ||||
| TestSiteClaroInstallTestScript | class | Drupal\TestSite | core/ |
Setup file used by TestSiteInstallTestScript. | ||||
| 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\Unit | core/ |
Creates a base source class for SQL migration testing. | ||||
| TestSqlBase | class | Drupal\Tests\migrate\Kernel | core/ |
A dummy source to help with testing SqlBase. | ||||
| 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. | ||||
| TestStaticMethodClass | class | Drupal\Tests\Component\Utility | core/ |
|||||
| 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 | in drupal:10.3.0 and is removed from drupal:11.0.0. There is no replacement and test discovery will be handled differently in PHPUnit 10. |
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 | |||
| TestTasksSettingsSub1 | class | Drupal\menu_test\Plugin\Menu\LocalTask | core/ |
Defines a local task plugin with a dynamic title. | 1 | |||
| TestTaskWithUserInput | class | Drupal\menu_test\Plugin\Menu\LocalTask | core/ |
1 | ||||
| TestTestDatabase | class | Drupal\Tests\Core\Test | core/ |
Stub class supports TestDatabaseTest::testConstructorNullPrefix(). | ||||
| TestTextfieldWidget | class | Drupal\field_plugins_test\Plugin\Field\FieldWidget | core/ |
Plugin implementation of the 'field_plugins_test_text_widget' widget. | ||||
| TestTextTrimmedFormatter | class | Drupal\field_plugins_test\Plugin\Field\FieldFormatter | core/ |
Plugin implementation of the 'field_plugins_test_text_formatter' formatter. | ||||
| TestThemeEngineExtensionList | class | Drupal\Tests\Core\Extension | core/ |
Test theme engine extension list class. | ||||
| TestThemeExtensionList | class | Drupal\Tests\Core\Extension | core/ |
Test theme extension list class. | ||||
| TestThemeNegotiator | class | Drupal\menu_test\Theme | core/ |
Tests the theme negotiation functionality. | 2 | |||
| TestTime | class | Drupal\update_test\Datetime | core/ |
Test service for altering the request time. | 2 | |||
| TestToolkit | class | Drupal\image_test\Plugin\ImageToolkit | core/ |
Defines a Test toolkit for image manipulation within Drupal. | 2 | |||
| TestTrait | trait | Drupal\Tests\system\Traits | core/ |
A nothing trait, but declared in the Drupal\Tests namespace. | 1 | |||
| TestTranslation | class | Drupal\media_test_source\Plugin\media\Source | core/ |
Provides test media source. | ||||
| TestTranslationManager | class | Drupal\Tests\Core\StringTranslation | core/ |
|||||
| TestTranslationManager | class | Drupal\Tests\user\Unit | core/ |
Implements a translation manager in tests. | ||||
| TestType | class | Drupal\workflow_type_test\Plugin\WorkflowType | core/ |
Test workflow type. | 4 | |||
| TestUrl | class | Drupal\Tests\Core | core/ |
Pagination
- Previous page
- Page 176
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.