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 |
|---|---|---|---|---|---|---|---|
| Textfield | class |
Drupal\ |
core/ |
Provides a one-line text field form element. | 3 | 3 | |
| TextField | class |
Drupal\ |
core/ |
Plugin annotation @MigrateField( id = "d6_text", type_map = { "text" = "text", "text_long" = "text_long", "text_with_summary" = "text_with_summary" }, core = {6}, source_module = "text", destination_module = "text", ) | 2 | ||
| TextField | class |
Drupal\ |
core/ |
Plugin annotation @MigrateField( id = "d7_text", type_map = { "text" = "text", "text_long" = "text_long", "text_with_summary" = "text_with_summary" }, core = {7}, source_module = "text", destination_module = "text", ) | 1 | ||
| Textfield | class |
Drupal\ |
core/ |
Defines the textfield element for the configuration translation interface. | |||
| TextFieldRdfaTest | class |
Drupal\ |
core/ |
Tests RDFa output by text field formatters. | |||
| TextfieldTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Render\Element\Textfield @group Render | |||
| TextFieldTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\text\Plugin\migrate\field\d6\TextField @group text | 1 | 1 | |
| TextFieldTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\text\Plugin\migrate\field\d7\TextField @group text | |||
| TextFieldTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\text\Plugin\migrate\field\d6\TextField @group text | |||
| TextFieldTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\text\Plugin\migrate\field\d7\TextField @group text | |||
| TextFieldTest | class |
Drupal\ |
core/ |
Tests the creation of text fields. | |||
| TextfieldWidget | class |
Drupal\ |
core/ |
Plugin implementation of the 'text_textfield' widget. | 1 | 1 | |
| TextFormat | class |
Drupal\ |
core/ |
Provides a text format render element. | |||
| TextFormat | class |
Drupal\ |
core/ |
Defines the text_format element for the configuration translation interface. | |||
| TextFormatElementFormTest | class |
Drupal\ |
core/ |
Tests PathElement validation and conversion functionality. | |||
| TextFormatterTest | class |
Drupal\ |
core/ |
Tests the text formatters functionality. | |||
| TextItem | class |
Drupal\ |
core/ |
Plugin implementation of the 'text' field type. | |||
| TextItemBase | abstract class |
Drupal\ |
core/ |
Base class for 'text' configurable field types. | 3 | 3 | |
| TextItemBaseTest | class |
Drupal\ |
core/ |
Tests TextItemBase. | |||
| TextItemSillyNormalizer | class |
Drupal\ |
core/ |
A test TextItem normalizer to test denormalization. | 2 | ||
| TextLongItem | class |
Drupal\ |
core/ |
Plugin implementation of the 'text_long' field type. | 1 | 2 | |
| TextProcessed | class |
Drupal\ |
core/ |
A computed property for processing text with a format. | |||
| TextSummaryOrTrimmedFormatter | class |
Drupal\ |
core/ |
Plugin implementation of the 'text_summary_or_trimmed' formatter. | |||
| TextSummaryTest | class |
Drupal\ |
core/ |
Tests text_summary() with different strings and lengths. | |||
| TextTrimmedFormatter | class |
Drupal\ |
core/ |
Plugin implementation of the 'text_trimmed' formatter. | 2 | 1 | |
| TextWithSummaryItem | class |
Drupal\ |
core/ |
Plugin implementation of the 'text_with_summary' field type. | |||
| TextWithSummaryItemTest | class |
Drupal\ |
core/ |
Tests using entity fields of the text summary field type. | |||
| Theme | class |
Drupal\ |
core/ |
Defines a class for updating themes using Drupal\Core\FileTransfer\FileTransfer classes via authorize.php. | |||
| ThemeAccessCheck | class |
Drupal\ |
core/ |
Provides access checking for themes for routing and theme negotiation. | 1 | 2 | |
| ThemeAdminForm | class |
Drupal\ |
core/ |
Form to select the administration theme. | |||
| ThemeCacheContext | class |
Drupal\ |
core/ |
Defines the ThemeCacheContext service, for "per theme" caching. | 2 | ||
| ThemeClass | class |
Drupal\ |
core/ |
Represents a random class, used to test if themes can provide classes. | |||
| ThemeController | class |
Drupal\ |
core/ |
Controller for theme handling. | |||
| ThemeEarlyInitializationTest | class |
Drupal\ |
core/ |
Tests that the theme system can be correctly initialized early in the page request. | |||
| ThemeEngineExtensionList | class |
Drupal\ |
core/ |
Provides a list of available theme engines. | 2 | 3 | 2 |
| ThemeEngineExtensionListTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Extension\ThemeEngineExtensionList @group Extension | |||
| ThemeExperimentalConfirmForm | class |
Drupal\ |
core/ |
Builds a confirmation form for enabling experimental themes. | 1 | ||
| ThemeExtensionList | class |
Drupal\ |
core/ |
Provides a list of available themes. | 3 | 10 | 2 |
| ThemeExtensionListTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Extension\ThemeExtensionList @group Extension | |||
| ThemeExtensionListTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Extension\ThemeExtensionList @group Extension | |||
| ThemeHandler | class |
Drupal\ |
core/ |
Default theme handler using the config system to store installation statuses. | 1 | 2 | 2 |
| ThemeHandlerInterface | interface |
Drupal\ |
core/ |
Manages the list of available themes. | 1 | 32 | |
| ThemeHandlerTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Extension\ThemeHandler @group Extension | |||
| ThemeInfoTest | class |
Drupal\ |
core/ |
Tests processing of theme .info.yml properties. | |||
| ThemeInitialization | class |
Drupal\ |
core/ |
Provides the theme initialization logic. | 2 | ||
| ThemeInitializationInterface | interface |
Drupal\ |
core/ |
Defines an interface which contain theme initialization logic. | 1 | ||
| ThemeInstaller | class |
Drupal\ |
core/ |
Manages theme installation/uninstallation. | 2 | ||
| ThemeInstallerInterface | interface |
Drupal\ |
core/ |
Manages theme installation/uninstallation. | 1 | 3 | |
| ThemeInstallerTest | class |
Drupal\ |
core/ |
Tests installing and uninstalling of themes. | |||
| ThemeLegacyTest | class |
Drupal\ |
core/ |
Tests legacy theme functions. |