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 |
|---|---|---|---|---|---|---|---|---|
| Transition | class | Drupal\workflows | core/ |
A transition value object that describes the transition between states. | 5 | |||
| TransitionInterface | interface | Drupal\workflows | core/ |
A transition value object that describes the transition between two states. | 1 | 3 | ||
| TransitionTest | class | Drupal\Tests\workflows\Unit | core/ |
@coversDefaultClass \Drupal\workflows\Transition[[api-linebreak]] | ||||
| TranslatableFieldTest | class | Drupal\Tests\layout_builder\Kernel | core/ |
Tests Layout Builder with a translatable layout field. | ||||
| TranslatableInterface | interface | Drupal\Core\TypedData | core/ |
Interface for translatable data. | 1 | 11 | ||
| TranslatableInterface | interface | Drupal\Core\Entity | core/ |
Provides methods for an entity to support translation. | 1 | 5 | ||
| TranslatableMarkup | class | Drupal\Core\StringTranslation | core/ |
Provides translatable markup class. | 2 | 731 | ||
| TranslatableMarkupTest | class | Drupal\Tests\Core\StringTranslation | core/ |
Tests the TranslatableMarkup class. | ||||
| TranslatableRevisionableInterface | interface | Drupal\Core\Entity | core/ |
Provides methods for an entity to support revision translation. | 1 | |||
| TranslatableRevisionableStorageInterface | interface | Drupal\Core\Entity | core/ |
A storage that supports translatable and revisionable entity types. | 1 | |||
| TranslatableStorageInterface | interface | Drupal\Core\Entity | core/ |
A storage that supports translatable entity types. | 1 | |||
| TranslatedViewTest | class | Drupal\Tests\views_ui\Functional | core/ |
Tests that translated strings in views UI don't override original strings. | ||||
| TranslateEditForm | class | Drupal\locale\Form | core/ |
Defines a translation edit form. | ||||
| TranslateFilterForm | class | Drupal\locale\Form | core/ |
Provides a filtered translation edit form. | ||||
| TranslateFormBase | abstract class | Drupal\locale\Form | core/ |
Defines the locale user interface translation form base. | 2 | |||
| Translation | class | Drupal\Core\Annotation | core/ |
Defines a translatable annotation object. | 1 | |||
| TranslationInterface | interface | Drupal\Core\StringTranslation | core/ |
Interface for the translation.manager translation service. | 2 | 69 | ||
| TranslationLanguageRenderer | class | Drupal\views\Entity\Render | core/ |
Renders entity translations in their row language. | ||||
| TranslationLink | class | Drupal\content_translation\Plugin\views\field | core/ |
Provides a translation link for an entity. | ||||
| TranslationLinkTest | class | Drupal\Tests\content_translation\Functional\Views | core/ |
Tests the content translation overview link field handler. | ||||
| TranslationManager | class | Drupal\Core\StringTranslation | core/ |
Defines a chained translation implementation combining multiple translators. | 1 | 5 | 2 | |
| TranslationManagerTest | class | Drupal\Tests\Core\StringTranslation | core/ |
@coversDefaultClass \Drupal\Core\StringTranslation\TranslationManager[[api-linebreak]] @group StringTranslation | ||||
| TranslationsStream | class | Drupal\locale\StreamWrapper | core/ |
Defines a Drupal translations (translations://) stream wrapper class. | 2 | |||
| TranslationStatusForm | class | Drupal\locale\Form | core/ |
Provides a translation status form. | 1 | |||
| TranslationStatusInterface | interface | Drupal\Core\TypedData | core/ |
Defines an interface for checking the status of an entity translation. | 1 | 3 | ||
| TranslationsTest | class | Drupal\Tests\media_library\FunctionalJavascript | core/ |
Tests media library for translatable media. | ||||
| TranslationString | class | Drupal\locale | core/ |
Defines the locale translation string object. | 1 | |||
| TranslationStringTest | class | Drupal\KernelTests\Core\StringTranslation | core/ |
Tests the TranslatableMarkup class. | ||||
| TranslationTest | class | Drupal\Tests\Core\Annotation | core/ |
@coversDefaultClass \Drupal\Core\Annotation\Translation[[api-linebreak]] @group Annotation | ||||
| TranslationTest | class | Drupal\Tests\field\Kernel | core/ |
Tests multilingual fields logic. | ||||
| TranslationWebTest | class | Drupal\Tests\field\Functional | core/ |
Tests multilingual fields logic that require a full environment. | ||||
| TranslationWrapper | in drupal:8.0.0 and is removed from drupal:11.0.0. Use the \Drupal\Core\StringTranslation\TranslatableMarkup class instead. |
class | Drupal\Core\StringTranslation | core/ |
Provides translatable string class. | 1 | ||
| TranslationWrapperTest | class | Drupal\Tests\Core\StringTranslation | core/ |
Tests the TranslationWrapper class. | ||||
| TranslatorInterface | interface | Drupal\Core\Validation | core/ |
Defines an interface used in validation. | 1 | 3 | ||
| TranslatorInterface | interface | Drupal\Core\StringTranslation\Translator | core/ |
Interface for objects capable of string translation. | 3 | 3 | ||
| TransliterationInterface | interface | Drupal\Component\Transliteration | core/ |
Defines an interface for classes providing transliteration. | 1 | 5 | ||
| TraversableObject | class | Drupal\jsonapi_test_data_type | core/ |
An object which implements \IteratorAggregate. | 2 | |||
| TraversableObjectNormalizer | class | Drupal\jsonapi_test_data_type\Normalizer | core/ |
Normalizes TraversableObject. | 2 | |||
| TraversableTypedDataInterface | interface | Drupal\Core\TypedData | core/ |
An interface for typed data objects that can be traversed. | 3 | 7 | ||
| TreeConfigTargetForm | class | Drupal\form_test\Form | core/ |
1 | 1 | |||
| TRexEditor | class | Drupal\editor_test\Plugin\Editor | core/ |
Defines a Tyrannosaurus-Rex powered text editor for testing purposes. | ||||
| TriggeringElementProgrammedTest | class | Drupal\KernelTests\Core\Form | core/ |
Tests detection of triggering_element for programmed form submissions. | ||||
| TriggeringElementTest | class | Drupal\Tests\system\FunctionalJavascript\Form | core/ |
Tests that FAPI correctly determines the triggering element. | ||||
| TriggerPreviewCommand | class | Drupal\views\Ajax | core/ |
Provides an AJAX command for triggering the views live preview. | 1 | |||
| Truncate | class | Drupal\mysql\Driver\Database\mysql | core/ |
MySQL implementation of \Drupal\Core\Database\Query\Truncate. | ||||
| Truncate | class | Drupal\sqlite\Driver\Database\sqlite | core/ |
SQLite implementation of \Drupal\Core\Database\Query\Truncate. | 1 | 1 | ||
| Truncate | class | Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses | core/ |
CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Truncate. | ||||
| Truncate | in drupal:9.4.0 and is removed from drupal:11.0.0. The SQLite database driver has been moved to the sqlite module. |
class | Drupal\Core\Database\Driver\sqlite | core/ |
SQLite implementation of \Drupal\Core\Database\Query\Truncate. | 1 | ||
| Truncate | in drupal:9.4.0 and is removed from drupal:11.0.0. The PostgreSQL database driver has been moved to the pgsql module. |
class | Drupal\Core\Database\Driver\pgsql | core/ |
PostgreSQL implementation of \Drupal\Core\Database\Query\Truncate. | 1 | ||
| Truncate | class | Drupal\Core\Database\Query | core/ |
General class for an abstracted TRUNCATE operation. | 4 | 7 |
Pagination
- Previous page
- Page 182
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.