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 |
|---|---|---|---|---|---|---|---|
| TrackerUser | class |
Drupal\ |
core/ |
Drupal 7 tracker user source from database. | |||
| TrackerUserTest | class |
Drupal\ |
core/ |
Tests D7 tracker user source plugin. | |||
| TrackerUserUidTest | class |
Drupal\ |
core/ |
Tests the tracker user uid handlers. | |||
| TraitAccessTest | class |
Drupal\ |
core/ |
Test whether traits are autoloaded during PHPUnit discovery time. | |||
| Transaction | class |
Drupal\ |
core/ |
A wrapper class for creating and managing database transactions. | 1 | 1 | |
| Transaction | class |
Drupal\ |
core/ |
CorefakeWithAllCustomClasses implementation of \Drupal\Core\Database\Transaction. | |||
| TransactionCommitFailedException | class |
Drupal\ |
core/ |
Exception thrown when a commit() function fails. | |||
| TransactionException | class |
Drupal\ |
core/ |
Exception thrown by an error in a database transaction. | 5 | ||
| TransactionExplicitCommitNotAllowedException | class |
Drupal\ |
core/ |
Exception to deny attempts to explicitly manage transactions. | |||
| TransactionNameNonUniqueException | class |
Drupal\ |
core/ |
Exception thrown when a savepoint or transaction name occurs twice. | |||
| TransactionNoActiveException | class |
Drupal\ |
core/ |
Exception for when popTransaction() is called with no active transaction. | 2 | ||
| TransactionOutOfOrderException | class |
Drupal\ |
core/ |
Exception thrown when a rollBack() resulted in other active transactions being rolled-back. | 1 | ||
| TransactionTest | class |
Drupal\ |
core/ |
Tests the transaction abstraction system. | |||
| TransformedConfigExportImportUITest | class |
Drupal\ |
core/ |
Tests the user interface for importing/exporting transformed configuration. | |||
| Transition | class |
Drupal\ |
core/ |
A transition value object that describes the transition between states. | 5 | ||
| TransitionInterface | interface |
Drupal\ |
core/ |
A transition value object that describes the transition between two states. | 1 | 3 | |
| TransitionTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\workflows\Transition | |||
| TranslatableFieldTest | class |
Drupal\ |
core/ |
Tests Layout Builder with a translatable layout field. | |||
| TranslatableInterface | interface |
Drupal\ |
core/ |
Provides methods for an entity to support translation. | 1 | 5 | |
| TranslatableInterface | interface |
Drupal\ |
core/ |
Interface for translatable data. | 1 | 11 | |
| TranslatableMarkup | class |
Drupal\ |
core/ |
Provides translatable markup class. | 2 | 93 | |
| TranslatableMarkupTest | class |
Drupal\ |
core/ |
Tests the TranslatableMarkup class. | |||
| TranslatableRevisionableInterface | interface |
Drupal\ |
core/ |
Provides methods for an entity to support revision translation. | 1 | ||
| TranslatableRevisionableStorageInterface | interface |
Drupal\ |
core/ |
A storage that supports translatable and revisionable entity types. | 1 | ||
| TranslatableStorageInterface | interface |
Drupal\ |
core/ |
A storage that supports translatable entity types. | 1 | ||
| TranslatedViewTest | class |
Drupal\ |
core/ |
Tests that translated strings in views UI don't override original strings. | |||
| TranslateEditForm | class |
Drupal\ |
core/ |
Defines a translation edit form. | |||
| TranslateFilterForm | class |
Drupal\ |
core/ |
Provides a filtered translation edit form. | |||
| TranslateFormBase | abstract class |
Drupal\ |
core/ |
Defines the locale user interface translation form base. | 2 | ||
| Translation | class |
Drupal\ |
core/ |
Defines a translatable annotation object. | 1 | ||
| TranslationInterface | interface |
Drupal\ |
core/ |
Interface for the translation.manager translation service. | 2 | 59 | |
| TranslationLanguageRenderer | class |
Drupal\ |
core/ |
Renders entity translations in their row language. | |||
| TranslationLink | class |
Drupal\ |
core/ |
Provides a translation link for an entity. | |||
| TranslationLinkTest | class |
Drupal\ |
core/ |
Tests the content translation overview link field handler. | |||
| TranslationManager | class |
Drupal\ |
core/ |
Defines a chained translation implementation combining multiple translators. | 1 | 4 | 2 |
| TranslationManagerTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\StringTranslation\TranslationManager @group StringTranslation | |||
| TranslationsStream | class |
Drupal\ |
core/ |
Defines a Drupal translations (translations://) stream wrapper class. | 2 | ||
| TranslationStatusForm | class |
Drupal\ |
core/ |
Provides a translation status form. | 1 | ||
| TranslationStatusInterface | interface |
Drupal\ |
core/ |
Defines an interface for checking the status of an entity translation. | 1 | 3 | |
| TranslationsTest | class |
Drupal\ |
core/ |
Tests media library for translatable media. | |||
| TranslationString | class |
Drupal\ |
core/ |
Defines the locale translation string object. | 1 | ||
| TranslationStringTest | class |
Drupal\ |
core/ |
Tests the TranslatableMarkup class. | |||
| TranslationTest | class |
Drupal\ |
core/ |
Tests multilanguage fields logic. | |||
| TranslationTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Annotation\Translation @group Annotation | |||
| TranslationWebTest | class |
Drupal\ |
core/ |
Tests multilanguage fields logic that require a full environment. | |||
| TranslationWrapper Deprecated | class |
Drupal\ |
core/ |
Provides translatable string class. | 1 | ||
| TranslationWrapperTest | class |
Drupal\ |
core/ |
Tests the TranslationWrapper class. | |||
| TranslatorInterface | interface |
Drupal\ |
core/ |
Defines an interface used in validation. | 1 | 3 | |
| TranslatorInterface | interface |
Drupal\ |
core/ |
Interface for objects capable of string translation. | 3 | 3 | |
| TransliterationInterface | interface |
Drupal\ |
core/ |
Defines an interface for classes providing transliteration. | 1 | 4 |