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 |
|---|---|---|---|---|---|---|---|---|
| TwigRegistryLoaderTest | class | Drupal\Tests\system\Functional\Theme | core/ |
Tests Twig registry loader. | ||||
| TwigSandboxPolicy | class | Drupal\Core\Template | core/ |
Default sandbox policy for Twig templates. | 1 | |||
| TwigSandboxTest | class | Drupal\Tests\Core\Template | core/ |
Tests the twig sandbox policy. | ||||
| TwigSettingsTest | class | Drupal\Tests\system\Functional\Theme | core/ |
Tests overriding Twig engine settings via settings.php. | ||||
| TwigSimpleCheckToStringNode | final class | Drupal\Core\Template | core/ |
Defines a twig node for simplifying CheckToStringNode. | ||||
| TwigThemeEngine | class | Drupal\Core\Template | core/ |
Twig theme engine. | 1 | |||
| TwigThemeTestController | class | Drupal\twig_theme_test | core/ |
Controller routines for Twig theme test routes. | ||||
| TwigThemeTestHooks | class | Drupal\twig_theme_test\Hook | core/ |
Hook implementations for twig_theme_test. | ||||
| TwigThemeTestUtils | class | Drupal\twig_theme_test | core/ |
Helper functions used by both test modules and test classes. | 2 | |||
| TwigTransTest | class | Drupal\Tests\system\Functional\Theme | core/ |
Tests Twig "trans" tags. | ||||
| TwigTransTokenParser | class | Drupal\Core\Template | core/ |
A class that defines the Twig 'trans' token parser for Drupal. | ||||
| TwoColumnLayout | class | Drupal\layout_builder\Plugin\Layout | core/ |
Configurable two column layout plugin class. | 1 | |||
| Type | class | Drupal\node\Plugin\views\argument | core/ |
Argument handler to accept a node type. | ||||
| TypedConfigInterface | interface | Drupal\Core\Config\Schema | core/ |
Interface for a typed configuration object that contains multiple elements. | 1 | 1 | ||
| TypedConfigManager | class | Drupal\Core\Config | core/ |
Manages config schema type plugins. | 2 | 2 | ||
| TypedConfigManagerInterface | interface | Drupal\Core\Config | core/ |
Defines an interface for managing config schema type plugins. | 1 | 54 | ||
| TypedConfigTest | class | Drupal\KernelTests\Config | core/ |
Tests config validation mechanism. | ||||
| TypedData | abstract class | Drupal\Core\TypedData | core/ |
The abstract base class for typed data. | 14 | 13 | ||
| TypedDataAwareValidatorTrait | trait | Drupal\Core\TypedData\Validation | core/ |
Defines a trait to access the typed data object of a validated value. | 5 | |||
| TypedDataCacheableDependencyInterface | interface | Drupal\Tests\Core\Plugin\Context | core/ |
Test interface used for mocking. | ||||
| TypedDataDefinitionEntityBundleTest | class | Drupal\KernelTests\Core\TypedData | core/ |
Tests data type metadata for entity bundles. | ||||
| TypedDataDefinitionTest | class | Drupal\KernelTests\Core\TypedData | core/ |
Tests deriving metadata of core data types. | ||||
| TypedDataInterface | interface | Drupal\Core\TypedData | core/ |
Interface for typed data objects. | 3 | 43 | ||
| TypedDataInternalPropertiesHelper | class | Drupal\Core\TypedData | core/ |
Helper class for internal properties. | 6 | |||
| TypedDataManager | class | Drupal\Core\TypedData | core/ |
Manages data type plugins. | 1 | 7 | 2 | |
| TypedDataManagerInterface | interface | Drupal\Core\TypedData | core/ |
Defines an interface for typed data manager. | 2 | 32 | ||
| TypedDataMetadata | class | Drupal\Core\TypedData\Validation | core/ |
Validator metadata for typed data objects. | ||||
| TypedDataNormalizer | class | Drupal\serialization\Normalizer | core/ |
Normalizes typed data objects into strings or arrays. | 1 | 2 | ||
| TypedDataNormalizerTest | class | Drupal\Tests\serialization\Unit\Normalizer | core/ |
Tests Drupal\serialization\Normalizer\TypedDataNormalizer. | ||||
| TypedDataStringBlock | class | Drupal\plugin_test\Plugin\plugin_test\mock_block | core/ |
Implements a String TypedData contextual block plugin. | ||||
| TypedDataTest | class | Drupal\KernelTests\Core\TypedData | core/ |
Tests the functionality of all core data types. | ||||
| TypedDataTrait | trait | Drupal\Core\TypedData | core/ |
Wrapper methods for classes that needs typed data manager object. | 2 | |||
| TypeResolver | class | Drupal\Core\Config\Schema | core/ |
Provides helper methods for resolving config schema types. | 8 | |||
| TypeResolverTest | class | Drupal\Tests\Core\Config | core/ |
Tests Drupal\Core\Config\Schema\TypeResolver. | ||||
| Uid | class | Drupal\user\Plugin\views\argument | core/ |
Argument handler to accept a user id. | 1 | 1 | ||
| UidRevision | class | Drupal\node\Plugin\views\filter | core/ |
Filter handler to check for revisions a certain user has created. | ||||
| UidRevision | class | Drupal\node\Plugin\views\argument | core/ |
Filter handler, accepts a user ID. | ||||
| UidRevisionTrait | trait | Drupal\node\Plugin\views | core/ |
Checks for nodes that a user posted or created a revision on. | 2 | |||
| UiHelperTrait | trait | Drupal\Tests | core/ |
Provides UI helper methods. | ||||
| UITestBase | abstract class | Drupal\Tests\views_ui\Functional | core/ |
Provides a base class for testing the Views UI. | 45 | 5 | ||
| UmamiHooks | class | Drupal\umami\Hook | core/ |
Hook implementations for umami. | ||||
| UmamiMultilingualInstallTest | class | Drupal\Tests\demo_umami\Functional | core/ |
Tests the multilingual installer installing the Umami profile. | ||||
| UnapprovedComments | class | Drupal\comment\Plugin\Menu\LocalTask | core/ |
Provides a local task that shows the amount of unapproved comments. | 1 | |||
| UnblockUser | class | Drupal\user\Plugin\Action | core/ |
Unblocks a user. | ||||
| UncacheableDependencyTrait | trait | Drupal\Core\Cache | core/ |
Trait to implement CacheableDependencyInterface for uncacheable objects. | 2 | |||
| UncacheableFieldHandlerTrait | trait | Drupal\views\Plugin\views\field | core/ |
Trait encapsulating the logic for uncacheable field handlers. | 1 | |||
| UncacheableTestAccessResult | class | Drupal\Tests\Core\Access | core/ |
Stub class for testing AccessResult. | ||||
| UncaughtExceptionTest | class | Drupal\FunctionalTests\Bootstrap | core/ |
Tests kernel panic when things are really messed up. | ||||
| UnchangingCacheableDependencyTrait | trait | Drupal\Core\Cache | core/ |
Trait to implement CacheableDependencyInterface for unchanging objects. | 4 | |||
| Undefined | class | Drupal\Core\Config\Schema | core/ |
Undefined configuration element. | 3 | 1 |
Pagination
- Previous page
- Page 206
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.