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 |
|---|---|---|---|---|---|---|---|
| TraversableObject | class |
Drupal\ |
core/ |
An object which implements \IteratorAggregate. | 2 | ||
| TraversableObjectNormalizer | class |
Drupal\ |
core/ |
Normalizes TraversableObject. | 2 | ||
| TraversableTypedDataInterface | interface |
Drupal\ |
core/ |
An interface for typed data objects that can be traversed. | 3 | 5 | |
| TRexEditor | class |
Drupal\ |
core/ |
Defines a Tyrannosaurus-Rex powered text editor for testing purposes. | |||
| TriggeringElementProgrammedTest | class |
Drupal\ |
core/ |
Tests detection of triggering_element for programmed form submissions. | |||
| TriggeringElementTest | class |
Drupal\ |
core/ |
Tests that FAPI correctly determines the triggering element. | |||
| TriggerPreviewCommand | class |
Drupal\ |
core/ |
Provides an AJAX command for triggering the views live preview. | 1 | ||
| Truncate | class |
Drupal\ |
core/ |
PostgreSQL implementation of \Drupal\Core\Database\Query\Truncate. | 1 | 1 | |
| Truncate | class |
Drupal\ |
core/ |
CorefakeWithAllCustomClasses implementation of \Drupal\Core\Database\Truncate. | |||
| Truncate | class |
Drupal\ |
core/ |
SQLite implementation of \Drupal\Core\Database\Query\Truncate. | |||
| Truncate | class |
Drupal\ |
core/ |
General class for an abstracted TRUNCATE operation. | 3 | 4 | |
| Truncate | class |
Drupal\ |
core/ |
PostgreSQL implementation of \Drupal\Core\Database\Query\Truncate. | |||
| TrustedCallbackInterface | interface |
Drupal\ |
core/ |
Interface to declare trusted callbacks. | 38 | 39 | |
| TrustedHostsRequestFactory | class |
Drupal\ |
core/ |
Provides a request factory for requests using host verification. | 2 | ||
| TrustedHostsRequestFactoryTest | class |
Drupal\ |
core/ |
Tests the trusted hosts request factory. | |||
| TrustedHostsTest | class |
Drupal\ |
core/ |
Tests output on the status overview page. | |||
| TrustedHostsTestController | class |
Drupal\ |
core/ |
Provides a test controller for testing the trusted hosts setting. | |||
| TrustedInterface | interface |
Drupal\ |
core/ |
1 | |||
| TrustedMethods | class |
Drupal\ |
core/ |
||||
| TrustedObject | class |
Drupal\ |
core/ |
||||
| TrustedRedirectResponse | class |
Drupal\ |
core/ |
Provides a redirect response which contains trusted URLs. | 2 | ||
| TrustedRedirectResponseTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Routing\TrustedRedirectResponse @group Routing | |||
| TwigDebugMarkupTest | class |
Drupal\ |
core/ |
Tests for Twig debug markup. | |||
| TwigEnvironment | class |
Drupal\ |
core/ |
A class that defines a Twig environment for Drupal. | 2 | 2 | |
| TwigEnvironmentTest | class |
Drupal\ |
core/ |
Tests Twig environment. | |||
| TwigEnvironmentTest | class |
Drupal\ |
core/ |
Tests the twig environment. | |||
| TwigExtension | class |
Drupal\ |
core/ |
A class providing Drupal Twig extensions. | 1 | 2 | |
| TwigExtensionPass | class |
Drupal\ |
core/ |
Adds the twig_extension_hash parameter to the container. | 1 | ||
| TwigExtensionTest | class |
Drupal\ |
core/ |
Tests the twig extension. | |||
| TwigExtensionTest | class |
Drupal\ |
core/ |
Tests Twig extensions. | |||
| TwigExtensionTestController | class |
Drupal\ |
core/ |
Controller routines for Twig extension test routes. | |||
| TwigExtensionTestString | class |
Drupal\ |
core/ |
||||
| TwigFilterTest | class |
Drupal\ |
core/ |
Tests Drupal's Twig filters. | |||
| TwigLoaderTest | class |
Drupal\ |
core/ |
Tests adding Twig loaders. | |||
| TwigMarkupInterfaceTest | class |
Drupal\ |
core/ |
Tests Twig with MarkupInterface objects. | |||
| TwigNamespaceTest | class |
Drupal\ |
core/ |
Tests Twig namespaces. | |||
| TwigNodeTrans | class |
Drupal\ |
core/ |
A class that defines the Twig 'trans' tag for Drupal. | |||
| TwigNodeVisitor | class |
Drupal\ |
core/ |
Provides a TwigNodeVisitor to change the generated parse-tree. | |||
| TwigPhpStorageCache | class |
Drupal\ |
core/ |
Provides an alternate cache storage for Twig using PhpStorage. | 1 | ||
| TwigRawTest | class |
Drupal\ |
core/ |
Tests Twig 'raw' filter. | |||
| TwigRegistryLoaderTest | class |
Drupal\ |
core/ |
Tests Twig registry loader. | |||
| TwigSandboxPolicy | class |
Drupal\ |
core/ |
Default sandbox policy for Twig templates. | 1 | ||
| TwigSandboxTest | class |
Drupal\ |
core/ |
Tests the twig sandbox policy. | |||
| TwigSettingsTest | class |
Drupal\ |
core/ |
Tests overriding Twig engine settings via settings.php. | |||
| TwigThemeTestController | class |
Drupal\ |
core/ |
Controller routines for Twig theme test routes. | |||
| TwigTransTest | class |
Drupal\ |
core/ |
Tests Twig "trans" tags. | |||
| TwigTransTokenParser | class |
Drupal\ |
core/ |
A class that defines the Twig 'trans' token parser for Drupal. | |||
| TwigWhiteListTest | class |
Drupal\ |
core/ |
Tests white-listing of entity properties. | |||
| TwoColumnLayout | class |
Drupal\ |
core/ |
Configurable two column layout plugin class. | 1 | ||
| Type | class |
Drupal\ |
core/ |
Argument handler to accept a node type. |