Classes, traits, and interfaces - main - 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 1529
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| TopBarItemManagerInterface | interface | Drupal\navigation | core/ |
Top bar item plugin manager. | 1 | 3 | ||
| TopBarItemManagerTest | class | Drupal\Tests\navigation\Unit | core/ |
Tests Drupal\navigation\TopBarItemManager. | ||||
| TopBarItemPluginInterface | interface | Drupal\navigation | core/ |
Interface for top bar plugins. | 1 | |||
| TopBarItemZero | class | Drupal\navigation_test\Plugin\TopBarItem | core/ |
Provides a top bar item plugin for testing the top bar item weight. | ||||
| TopLevelDataInterface | interface | Drupal\jsonapi\JsonApiResource | core/ |
Interface for objects that can appear as top-level object data. | 2 | 1 | ||
| ToStringTrait | in drupal:11.4.0 and is removed from drupal:13.0.0. Implement the __toString() method directly, exception handling is no longer required. |
trait | Drupal\Component\Utility | core/ |
Wraps __toString in a trait to avoid some fatal errors. | |||
| TrackChangesTest | class | Drupal\Tests\migrate\Kernel | core/ |
Tests migration track changes property. | ||||
| TrackChangesTest | class | Drupal\migrate_track_changes_test\Plugin\migrate\source | core/ |
Source plugin for migration track changes tests. | ||||
| TraitAccessTest | class | Drupal\Tests\system\Unit | core/ |
Test whether traits are autoloaded during PHPUnit discovery time. | ||||
| Transaction | class | Drupal\Core\Database | core/ |
A wrapper class for creating and managing database transactions. | 1 | 6 | ||
| Transaction | class | Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses | core/ |
CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Transaction. | ||||
| TransactionCommitFailedException | class | Drupal\Core\Database | core/ |
Exception thrown when a commit() function fails. | 1 | |||
| TransactionException | class | Drupal\Core\Database | core/ |
Exception thrown by an error in a database transaction. | 5 | |||
| TransactionExplicitCommitNotAllowedException | class | Drupal\Core\Database | core/ |
Exception to deny attempts to explicitly manage transactions. | ||||
| TransactionManager | class | Drupal\mysql\Driver\Database\mysql | core/ |
MySql implementation of TransactionManagerInterface. | ||||
| TransactionManager | class | Drupal\sqlite\Driver\Database\sqlite | core/ |
SQLite implementation of TransactionManagerInterface. | ||||
| TransactionManager | class | Drupal\mysqli\Driver\Database\mysqli | core/ |
MySqli implementation of TransactionManagerInterface. | ||||
| TransactionManager | class | Drupal\pgsql\Driver\Database\pgsql | core/ |
PostgreSql implementation of TransactionManagerInterface. | ||||
| TransactionManagerBase | abstract class | Drupal\Core\Database\Transaction | core/ |
The database transaction manager base class. | 4 | 6 | ||
| TransactionManagerInterface | interface | Drupal\Core\Database\Transaction | core/ |
Interface for the database transaction manager classes. | 1 | 5 | ||
| TransactionNameNonUniqueException | class | Drupal\Core\Database | core/ |
Exception thrown when a savepoint or transaction name occurs twice. | 3 | |||
| TransactionNoActiveException | class | Drupal\Core\Database | core/ |
Exception for when popTransaction() is called with no active transaction. | ||||
| TransactionOutOfOrderException | class | Drupal\Core\Database | core/ |
Exception thrown transactions are out of order. | 4 | |||
| TransactionTest | class | Drupal\Tests\pgsql\Kernel\pgsql | core/ |
Tests transaction for the PostgreSQL driver. | ||||
| TransactionTest | class | Drupal\Tests\mysqli\Kernel\mysqli | core/ |
Tests transaction for the MySQLi driver. | ||||
| TransactionTest | class | Drupal\KernelTests\Core\Database | core/ |
Tests the transactions, using the explicit ::commitOrRelease method. | ||||
| TransactionTest | class | Drupal\Tests\sqlite\Kernel\sqlite | core/ |
Tests transaction for the SQLite driver. | ||||
| TransactionTest | class | Drupal\Tests\mysql\Kernel\mysql | core/ |
Tests transaction for the MySQL driver. | ||||
| TransformedConfigExportImportUITest | class | Drupal\Tests\config\Functional | core/ |
Tests the user interface for importing/exporting transformed configuration. | ||||
| 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/ |
Tests Drupal\workflows\Transition. | ||||
| 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 | 13 | ||
| 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 | 968 | 1 | |
| 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 | |||
| TranslatableStringAdapter | final class | Drupal\package_manager | core/ |
An adapter for interoperable string translation. | 2 | |||
| TranslatableStringFactory | final class | Drupal\package_manager | core/ |
Creates translatable strings that can interoperate with Composer Stager. | 2 | |||
| TranslatableStringTest | class | Drupal\Tests\package_manager\Kernel | core/ |
Tests Translatable String. | ||||
| 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. | 1 | 76 | ||
| TranslationLanguageRenderer | class | Drupal\views\Entity\Render | core/ |
Renders entity translations in their row language. |
Pagination
- Previous page
- Page 210
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.