Classes, traits, and interfaces - 9.5.x - 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 1523
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| 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. | 1 | 2 | ||
| TypedConfigManagerInterface | interface | Drupal\Core\Config | core/ |
Defines an interface for managing config schema type plugins. | 1 | 19 | ||
| 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 | 12 | ||
| 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. | ||||
| 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 | 28 | ||
| TypedDataInternalPropertiesHelper | class | Drupal\Core\TypedData | core/ |
Helper class for internal properties. | 8 | |||
| TypedDataManager | class | Drupal\Core\TypedData | core/ |
Manages data type plugins. | 1 | 6 | 2 | |
| TypedDataManagerInterface | interface | Drupal\Core\TypedData | core/ |
Defines an interface for typed data manager. | 2 | 22 | ||
| TypedDataMetadata | class | Drupal\Core\TypedData\Validation | core/ |
Validator metadata for typed data objects. | ||||
| TypedDataNormalizer | class | Drupal\serialization\Normalizer | core/ |
Converts typed data objects to arrays. | 1 | 2 | ||
| TypedDataNormalizerTest | class | Drupal\Tests\serialization\Unit\Normalizer | core/ |
@coversDefaultClass \Drupal\serialization\Normalizer\TypedDataNormalizer[[api-linebreak]] @group serialization | ||||
| 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. | 3 | |||
| TypeLinkManager | class | Drupal\hal\LinkManager | core/ |
2 | ||||
| TypeLinkManagerInterface | interface | Drupal\hal\LinkManager | core/ |
2 | ||||
| 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. | ||||
| UidUpdateToSerialTest | class | Drupal\Tests\user\Functional | core/ |
Tests user_update_9301(). | ||||
| 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. | 46 | 7 | ||
| 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. | 3 | |||
| UncacheableFieldHandlerTrait | trait | Drupal\views\Plugin\views\field | core/ |
Trait encapsulating the logic for uncacheable field handlers. | 1 | |||
| UncacheableTestAccessResult | class | Drupal\Tests\Core\Access | core/ |
|||||
| 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 | ||
| UndefinedLinkTemplateException | class | Drupal\Core\Entity\Exception | core/ |
Defines an exception class for undefined link templates. | 4 | |||
| UnformattedSummary | class | Drupal\views\Plugin\views\style | core/ |
The default style plugin for summaries. | ||||
| Unicode | class | Drupal\Component\Utility | core/ |
Provides Unicode-related conversions and operations. | 41 | |||
| UnicodeTest | class | Drupal\Tests\Component\Utility | core/ |
Test unicode handling features implemented in Unicode component. | ||||
| UnicornEditor | class | Drupal\editor_test\Plugin\Editor | core/ |
Defines a Unicorn-powered text editor for Drupal (for testing purposes). | ||||
| UninstallDefaultContentTest | class | Drupal\Tests\demo_umami_content\Functional | core/ |
Tests that uninstalling default content removes created content. | ||||
| UninstalledExtensionException | class | Drupal\Core\Extension\Exception | core/ |
Exception class thrown when a specified extension has not been installed. | ||||
| UninstallKernelTest | class | Drupal\Tests\system\Kernel\Installer | core/ |
Tests the uninstallation of modules. | ||||
| UninstallTest | class | Drupal\Tests\system\Functional\Module | core/ |
Tests the uninstallation of modules. | ||||
| UniqueFieldConstraint | class | Drupal\Core\Validation\Plugin\Validation\Constraint | core/ |
Checks if an entity field has a unique value. | 4 | 4 | ||
| UniqueFieldConstraintTest | class | Drupal\KernelTests\Core\Validation | core/ |
Tests the unique field value validation constraint. | ||||
| UniqueFieldValueValidator | class | Drupal\Core\Validation\Plugin\Validation\Constraint | core/ |
Validates that a field is unique for the given entity type. | ||||
| UniqueLabelInListConstraint | class | Drupal\ckeditor5\Plugin\Validation\Constraint | core/ |
Uniquely labeled list item constraint. |
Pagination
- Previous page
- Page 175
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.