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 |
|---|---|---|---|---|---|---|---|---|
| TestBaseInterface | interface | Drupal\Tests\Component\ProxyBuilder | core/ |
1 | ||||
| TestBlockInstantiation | class | Drupal\block_test\Plugin\Block | core/ |
Provides a basic block for testing block instantiation and configuration. | 1 | |||
| TestBlockPluginWithRefinableDependentAccessInterface | interface | Drupal\Tests\layout_builder\Unit | core/ |
Test interface for dependent access block plugins. | ||||
| TestCacheableDependency | class | Drupal\Tests\Core\Render | core/ |
Cacheable dependency object for use in tests. | 1 | |||
| TestCacheBlock | class | Drupal\block_test\Plugin\Block | core/ |
Provides a block to test caching. | 1 | |||
| TestCallables | class | Drupal\Tests\Core\Render | core/ |
|||||
| TestChildInterface | interface | Drupal\Tests\Component\ProxyBuilder | core/ |
1 | ||||
| TestClass | class | Drupal\Tests\Core\Plugin | core/ |
|||||
| TestClass | class | Drupal\Tests\Component\Utility | core/ |
Provides a test class. | ||||
| TestClass | class | Drupal\Tests\Core\Test | core/ |
|||||
| TestClass | class | Drupal\service_provider_test | core/ |
2 | ||||
| TestClass | class | Drupal\Tests\layout_builder\Unit | core/ |
Test class using the trait. | ||||
| TestCompatibilityTrait | trait | Drupal\TestTools\PhpUnitCompatibility\PhpUnit8 | core/ |
Drupal's forward compatibility layer with multiple versions of PHPUnit. | ||||
| TestCompatibilityTrait | trait | Drupal\TestTools\PhpUnitCompatibility\PhpUnit9 | core/ |
Drupal's forward compatibility layer with multiple versions of PHPUnit. | ||||
| TestConcat | class | Drupal\Tests\migrate\Unit\process | core/ |
|||||
| TestConditionAccessResolverTrait | class | Drupal\Tests\Core\Condition | core/ |
|||||
| TestConfigEntityWithPluginCollections | class | Drupal\Tests\Core\Config\Entity | core/ |
|||||
| TestConfigFactoryOverrideBase | class | Drupal\Tests\Core\Config | core/ |
|||||
| TestConfigNamesMapper | class | Drupal\Tests\config_translation\Unit | core/ |
Defines a test mapper class. | ||||
| TestConfigType | class | Drupal\module_installer_config_test\Entity | core/ |
Defines a configuration-based entity type used for testing. | ||||
| TestConfigurableContextAwarePlugin | class | Drupal\KernelTests\Core\Plugin\Context | core/ |
|||||
| TestConfigurableContextAwarePluginInterface | interface | Drupal\Tests\Core\Plugin | core/ |
|||||
| TestConfigurablePlugin | class | Drupal\Tests\Core\Plugin\Fixtures | core/ |
3 | ||||
| TestContainerDerivativeDiscovery | class | Drupal\Tests\Core\Plugin\Discovery | core/ |
Defines container test derivative discovery. | ||||
| TestContent | class | Drupal\router_test | core/ |
Test controllers that are intended to be wrapped in a main controller. | ||||
| TestContextAwareBlock | class | Drupal\block_test\Plugin\Block | core/ |
Provides a context-aware block. | ||||
| TestContextAwareLayout | class | Drupal\layout_builder_test\Plugin\Layout | core/ |
Plugin annotation @Layout( id = "layout_builder_test_context_aware", label = @Translation("Layout Builder Test: Context Aware"), regions = { "main" = { "label" = @Translation("Main Region") } }, context_definitions = { … | ||||
| TestContextAwareNoValidContextOptionsBlock | class | Drupal\block_test\Plugin\Block | core/ |
Provides a context-aware block that uses a not-passed, non-required context. | ||||
| TestContextAwarePlugin | class | Drupal\KernelTests\Core\Plugin | core/ |
Provides a test implementation of a context-aware plugin. | ||||
| TestContextAwarePlugin | class | Drupal\KernelTests\Core\Plugin\Context | core/ |
|||||
| TestContextAwarePluginDefinition | class | Drupal\KernelTests\Core\Plugin\Context | core/ |
|||||
| TestContextAwareUnsatisfiedBlock | class | Drupal\block_test\Plugin\Block | core/ |
Provides a context-aware block. | ||||
| TestContextualLink | class | Drupal\menu_test\Plugin\Menu\ContextualLink | core/ |
Defines a contextual link plugin with a dynamic title from user input. | 1 | |||
| TestController | class | Drupal\httpkernel_test\Controller | core/ |
A test controller. | ||||
| TestController | class | Drupal\token_test\Controller | core/ |
Provides a test controller for token replacement. | ||||
| TestController | class | Drupal\container_rebuild_test | core/ |
|||||
| TestController | class | Drupal\conneg_test\Controller | core/ |
Test controller for content negotiation tests. | ||||
| TestController | class | Drupal\dialog_renderer_test\Controller | core/ |
Test controller display modal links and content. | ||||
| TestController | class | Drupal\off_canvas_test\Controller | core/ |
Test controller for 2 different responses. | ||||
| TestController | class | Drupal\csrf_test\Controller | core/ |
Just a test controller for test routes. | ||||
| TestController | class | Drupal\js_webassert_test\Controller | core/ |
|||||
| TestController | class | Drupal\contextual_test\Controller | core/ |
Test controller to provide a callback for the contextual link. | ||||
| TestController | class | Drupal\views_test_modal\Controller | core/ |
|||||
| TestController | class | Drupal\csrf_race_test\Controller | core/ |
Controller to test concurrent CSRF token generation. | ||||
| TestController | class | Drupal\Tests\Core\Controller | core/ |
Defines a test controller used by unit tests. | ||||
| TestController | class | Drupal\Tests\Core\Access | core/ |
|||||
| TestController | class | Drupal\Tests\views\Unit\Plugin\display | core/ |
A page controller for use by tests in this file. | ||||
| TestControllers | class | Drupal\paramconverter_test | core/ |
Controller routine for testing the paramconverter. | ||||
| TestControllers | class | Drupal\menu_test | core/ |
Controllers for testing the menu integration routing system. | ||||
| TestControllers | class | Drupal\router_test | core/ |
Controller routines for testing the routing system. | 1 |
Pagination
- Previous page
- Page 163
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.