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 |
|---|---|---|---|---|---|---|---|---|
| ToolbarTestThemeHooks | class | Drupal\toolbar_test\Hook | core/ |
Hook implementations for toolbar_test. | ||||
| ToolbarThemeHooks | class | Drupal\toolbar\Hook | core/ |
Hook implementations for toolbar. | ||||
| ToolkitGdTest | class | Drupal\KernelTests\Core\Image | core/ |
Tests for the GD image toolkit. | ||||
| ToolkitSetupFormTest | class | Drupal\FunctionalTests\Image | core/ |
Tests image toolkit setup form. | ||||
| ToolkitTest | class | Drupal\KernelTests\Core\Image | core/ |
Tests the image toolkit. | ||||
| ToolkitTestTrait | trait | Drupal\Tests\Traits\Core\Image | core/ |
Provides common methods for image toolkit kernel tests. | 2 | |||
| TopBar | class | Drupal\navigation\Element | core/ |
Provides a render element for the default Drupal toolbar. | ||||
| TopBarItem | final class | Drupal\navigation\Attribute | core/ |
The top bar item attribute. | 8 | |||
| TopBarItemBase | abstract class | Drupal\navigation | core/ |
Base class for top bar item plugins. | 7 | 8 | ||
| TopBarItemBaseTest | class | Drupal\Tests\navigation\Unit | core/ |
Tests Drupal\navigation\TopBarItemBase. | ||||
| TopBarItemHigh | class | Drupal\navigation_test\Plugin\TopBarItem | core/ |
Provides a top bar item plugin for testing the top bar item weight. | ||||
| TopBarItemInstantiation | class | Drupal\navigation_test\Plugin\TopBarItem | core/ |
Provides a top bar item plugin for testing the top bar. | 1 | |||
| TopBarItemLinkAttribute | class | Drupal\navigation_test_top_bar\Plugin\TopBarItem | core/ |
Provides a top bar item plugin for testing link attributes in the top bar. | ||||
| TopBarItemLow | class | Drupal\navigation_test\Plugin\TopBarItem | core/ |
Provides a top bar item plugin for testing the top bar item weight. | ||||
| TopBarItemManager | final class | Drupal\navigation | core/ |
Top bar item plugin manager. | 1 | 2 | ||
| 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_fake\Driver\Database\CoreFakeWithAllCustomClasses | core/ |
CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Transaction. | ||||
| Transaction | class | Drupal\Core\Database | core/ |
A wrapper class for creating and managing database transactions. | 1 | 6 | ||
| 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 |
Pagination
- Previous page
- Page 201
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.