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 |
|---|---|---|---|---|---|---|---|
| TypedConfigInterface | interface |
Drupal\ |
core/ |
Interface for a typed configuration object that contains multiple elements. | 1 | 1 | |
| TypedConfigManager | class |
Drupal\ |
core/ |
Manages config schema type plugins. | 1 | 2 | |
| TypedConfigManagerInterface | interface |
Drupal\ |
core/ |
Defines an interface for managing config schema type plugins. | 1 | 17 | |
| TypedConfigTest | class |
Drupal\ |
core/ |
Tests config validation mechanism. | |||
| TypedData | abstract class |
Drupal\ |
core/ |
The abstract base class for typed data. | 14 | 12 | |
| TypedDataAwareValidatorTrait | trait |
Drupal\ |
core/ |
Defines a trait to access the typed data object of a validated value. | 5 | ||
| TypedDataCacheableDependencyInterface | interface |
Drupal\ |
core/ |
Test interface used for mocking. | |||
| TypedDataDefinitionTest | class |
Drupal\ |
core/ |
Tests deriving metadata of core data types. | |||
| TypedDataInterface | interface |
Drupal\ |
core/ |
Interface for typed data objects. | 3 | 28 | |
| TypedDataInternalPropertiesHelper | class |
Drupal\ |
core/ |
Helper class for internal properties. | 8 | ||
| TypedDataManager | class |
Drupal\ |
core/ |
Manages data type plugins. | 1 | 6 | 2 |
| TypedDataManagerInterface | interface |
Drupal\ |
core/ |
Defines an interface for typed data manager. | 2 | 23 | |
| TypedDataMetadata | class |
Drupal\ |
core/ |
Validator metadata for typed data objects. | |||
| TypedDataNormalizer | class |
Drupal\ |
core/ |
Converts typed data objects to arrays. | 1 | 2 | |
| TypedDataNormalizerTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\serialization\Normalizer\TypedDataNormalizer @group serialization | |||
| TypedDataStringBlock | class |
Drupal\ |
core/ |
Implementation of a String TypedData contextual block plugin used by Plugin API context test. | |||
| TypedDataTest | class |
Drupal\ |
core/ |
Tests the functionality of all core data types. | |||
| TypedDataTrait | trait |
Drupal\ |
core/ |
Wrapper methods for classes that needs typed data manager object. | 3 | ||
| TypeLinkManager | class |
Drupal\ |
core/ |
2 | |||
| TypeLinkManagerInterface | interface |
Drupal\ |
core/ |
2 | |||
| Uid | class |
Drupal\ |
core/ |
Argument handler to accept a user id. | 1 | 1 | |
| UidRevision | class |
Drupal\ |
core/ |
Filter handler to check for revisions a certain user has created. | |||
| UidRevision | class |
Drupal\ |
core/ |
Filter handler to accept a user id to check for nodes that user posted or created a revision on. | |||
| UidUpdateToSerialTest | class |
Drupal\ |
core/ |
Tests user_update_9301(). | |||
| UiHelperTrait | trait |
Drupal\ |
core/ |
Provides UI helper methods. | |||
| UITestBase | abstract class |
Drupal\ |
core/ |
Provides a base class for testing the Views UI. | 44 | 5 | |
| UmamiMultilingualInstallTest | class |
Drupal\ |
core/ |
Tests the multilingual installer installing the Umami profile. | |||
| UnapprovedComments | class |
Drupal\ |
core/ |
Provides a local task that shows the amount of unapproved comments. | 1 | ||
| UnblockUser | class |
Drupal\ |
core/ |
Unblocks a user. | |||
| UncacheableDependencyTrait | trait |
Drupal\ |
core/ |
Trait to implement CacheableDependencyInterface for uncacheable objects. | 3 | ||
| UncacheableFieldHandlerTrait | trait |
Drupal\ |
core/ |
Trait encapsulating the logic for uncacheable field handlers. | 1 | ||
| UncacheableTestAccessResult | class |
Drupal\ |
core/ |
||||
| UncaughtExceptionTest | class |
Drupal\ |
core/ |
Tests kernel panic when things are really messed up. | |||
| UnchangingCacheableDependencyTrait | trait |
Drupal\ |
core/ |
Trait to implement CacheableDependencyInterface for unchanging objects. | 4 | ||
| Undefined | class |
Drupal\ |
core/ |
Undefined configuration element. | 3 | 1 | |
| UndefinedLinkTemplateException | class |
Drupal\ |
core/ |
Defines an exception class for undefined link templates. | 4 | ||
| UnformattedSummary | class |
Drupal\ |
core/ |
The default style plugin for summaries. | |||
| Unicode | class |
Drupal\ |
core/ |
Provides Unicode-related conversions and operations. | 41 | ||
| UnicodeTest | class |
Drupal\ |
core/ |
Test unicode handling features implemented in Unicode component. | |||
| UnicornEditor | class |
Drupal\ |
core/ |
Defines a Unicorn-powered text editor for Drupal (for testing purposes). | |||
| UninstallDefaultContentTest | class |
Drupal\ |
core/ |
Tests that uninstalling default content removes created content. | |||
| UninstalledExtensionException | class |
Drupal\ |
core/ |
Exception class thrown when a specified extension has not been installed. | |||
| UninstallKernelTest | class |
Drupal\ |
core/ |
Tests the uninstallation of modules. | |||
| UninstallTest | class |
Drupal\ |
core/ |
Tests the uninstallation of modules. | |||
| UniqueFieldConstraint | class |
Drupal\ |
core/ |
Checks if an entity field has a unique value. | 4 | 4 | |
| UniqueFieldConstraintTest | class |
Drupal\ |
core/ |
Tests the unique field value validation constraint. | |||
| UniqueFieldValueValidator | class |
Drupal\ |
core/ |
Validates that a field is unique for the given entity type. | |||
| UniquePathAliasConstraint | class |
Drupal\ |
core/ |
Validation constraint for unique path alias values. | |||
| UniquePathAliasConstraintValidator | class |
Drupal\ |
core/ |
Constraint validator for a unique path alias. | |||
| UnitTestCase | abstract class |
Drupal\ |
core/ |
Provides a base class and helpers for Drupal unit tests. | 559 | 554 |