Classes, traits, and interfaces in Drupal 9
Primary tabs
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
|
Name |
Type | Namespace | Location | Description | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|
| TimestampItemNormalizerTest | class |
Drupal\ |
core/ |
Tests that TimestampItem (de)normalization uses Timestamp (de)normalization. | |||
| TimestampItemTest | class |
Drupal\ |
core/ |
Tests the timestamp fields. | |||
| TimestampNormalizer | class |
Drupal\ |
core/ |
Converts values for the Timestamp data type to and from common formats. | 1 | 2 | |
| TimestampNormalizerTest | class |
Drupal\ |
core/ |
Unit test coverage for the "Timestamp" @DataType. | |||
| TimestampNormalizerTestDrupalDateTime | class |
Drupal\ |
core/ |
Note: Prophecy does not support magic methods. By subclassing and specifying an explicit method, Prophecy works. | |||
| TimestampSchemaTest | class |
Drupal\ |
core/ |
Tests timestamp schema. | |||
| TimestampTest | class |
Drupal\ |
core/ |
Tests the functionality of Timestamp core field UI. | |||
| TimeTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Component\Datetime\Time @group Datetime | |||
| TimeZone | class |
Drupal\ |
core/ |
Process the D6 Timezone offset into a D8 compatible timezone name. | |||
| TimeZoneCacheContext | class |
Drupal\ |
core/ |
Defines the TimeZoneCacheContext service, for "per time zone" caching. | 2 | ||
| TimezoneController | class |
Drupal\ |
core/ |
Provides a callback for finding out a timezone name. | |||
| TimeZoneItem | class |
Drupal\ |
core/ |
Defines a custom field item class for the 'timezone' user entity field. | 1 | ||
| TimeZoneResolver | class |
Drupal\ |
core/ |
Event handler that resolves time zone based on site and user configuration. | 2 | ||
| TimezoneResolverTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\system\TimeZoneResolver @group system | |||
| TimezoneTest | class |
Drupal\ |
core/ |
Test coverage for time zone handling. | |||
| TimezoneTest | class |
Drupal\ |
core/ |
Tests the timezone handling of datetime and datelist element types. | |||
| Tip | class |
Drupal\ |
core/ |
Defines a tour item annotation object. | |||
| TipPluginBase | abstract class |
Drupal\ |
core/ |
Defines a base tour item implementation. | 4 | 5 | |
| TipPluginBaseTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\tour\TipPluginBase | |||
| TipPluginImage | class |
Drupal\ |
core/ |
Displays an image as a tip. | |||
| TipPluginImageLegacy | class |
Drupal\ |
core/ |
Displays an image as a tip. | |||
| TipPluginInterface | interface |
Drupal\ |
core/ |
Defines an interface for tour items. | 2 | ||
| TipPluginManager | class |
Drupal\ |
core/ |
Provides a plugin manager for tour items. | 2 | ||
| TipPluginText | class |
Drupal\ |
core/ |
Displays some text as a tip. | |||
| TipPluginTextLegacy | class |
Drupal\ |
core/ |
Displays some text as a tip. | |||
| TipsPluginCollection | class |
Drupal\ |
core/ |
A collection of tips. | 1 | ||
| Title | class |
Drupal\ |
core/ |
Views area title override handler. | |||
| TitleBlockPluginInterface | interface |
Drupal\ |
core/ |
The interface for "title" blocks. | 1 | 3 | |
| TitleCallback | class |
Drupal\ |
core/ |
Provides an example title callback for the testDynamicTitle method above. | |||
| TitleResolver | class |
Drupal\ |
core/ |
Provides the default implementation of the title resolver interface. | 1 | 2 | |
| TitleResolverInterface | interface |
Drupal\ |
core/ |
Defines a class which knows how to generate the title from a given route. | 1 | 6 | |
| TitleResolverTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Controller\TitleResolver @group Controller | |||
| Token | class |
Drupal\ |
core/ |
Drupal placeholder/token replacement system. | 10 | 2 | |
| Token | class |
Drupal\ |
core/ |
Stores token data in a hidden form field. | 1 | ||
| TokenizeAreaPluginBase | abstract class |
Drupal\ |
core/ |
Tokenized base class for area handlers. | 3 | ||
| TokenizeAreaUITest | class |
Drupal\ |
core/ |
Tests the token display for the TokenizeAreaPluginBase UI. | |||
| TokenReplaceKernelTest | class |
Drupal\ |
core/ |
Generates text using placeholders for dummy content to check token replacement. | |||
| TokenReplaceKernelTestBase | abstract class |
Drupal\ |
core/ |
Base class for token replacement tests. | 2 | 1 | |
| TokenReplaceTest | class |
Drupal\ |
core/ |
Generates text using placeholders for dummy content to check taxonomy token replacement. | |||
| TokenReplaceTest | class |
Drupal\ |
core/ |
Tests core view token replacement. | |||
| TokenReplaceWebTest | class |
Drupal\ |
core/ |
Tests the token system integration. | |||
| TokenScanTest | class |
Drupal\ |
core/ |
Scan token-like patterns in a dummy text to check token scanning. | |||
| TokenTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Render\Element\Token @group Render | |||
| TokenTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Utility\Token @group Utility | |||
| Toolbar | class |
Drupal\ |
core/ |
Provides a render element for the default Drupal toolbar. | |||
| ToolbarAdminMenuTest | class |
Drupal\ |
core/ |
Tests the caching of the admin menu subtree items. | |||
| ToolbarCacheContextsTest | class |
Drupal\ |
core/ |
Tests the cache contexts for toolbar. | |||
| ToolbarClaroOverridesTest | class |
Drupal\ |
core/ |
Tests the loading of Claro assets on a non-Claro default theme. | |||
| ToolbarController | class |
Drupal\ |
core/ |
Defines a controller for the toolbar module. | 1 | ||
| ToolbarHookToolbarTest | class |
Drupal\ |
core/ |
Tests the implementation of hook_toolbar() by a module. |