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 |
|---|---|---|---|---|---|---|---|
| ConfigDependenciesTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\rest\Entity\ConfigDependencies | |||
| ConfigDependencyDeleteFormTrait | trait |
Drupal\ |
core/ |
Lists affected configuration entities by a dependency removal. | 2 | ||
| ConfigDependencyManager | class |
Drupal\ |
core/ |
Provides a class to discover configuration entity dependencies. | 5 | ||
| ConfigDependencyManagerTest | class |
Drupal\ |
core/ |
Tests the ConfigDependencyManager class. | |||
| ConfigDependencyManagerTest | class |
Drupal\ |
core/ |
Tests the ConfigDependencyManager class. | |||
| ConfigDependencyTest | class |
Drupal\ |
core/ |
Tests for configuration dependencies. | |||
| ConfigDependencyWebTest | class |
Drupal\ |
core/ |
Tests configuration entities. | |||
| ConfigDiffTest | class |
Drupal\ |
core/ |
Calculating the difference between two sets of configuration. | |||
| ConfigDirectoryNotDefinedException | class |
Drupal\ |
core/ |
An exception thrown when the config sync directory is not defined. | 1 | ||
| ConfigDraggableListBuilderTest | class |
Drupal\ |
core/ |
Tests draggable list builder. | |||
| ConfigDuplicateUUIDException | class |
Drupal\ |
core/ |
Exception thrown when a config object UUID causes a conflict. | 3 | ||
| ConfigEntityAdapter | class |
Drupal\ |
core/ |
Enhances EntityAdapter for config entities. | 2 | ||
| ConfigEntityAdapterTest | class |
Drupal\ |
core/ |
Tests entity adapter for configuration entities. | |||
| ConfigEntityBase | abstract class |
Drupal\ |
core/ |
Defines a base configuration entity class. | 26 | 26 | |
| ConfigEntityBaseUnitTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Config\Entity\ConfigEntityBase @group Config | |||
| ConfigEntityBaseWithPluginCollections | abstract class |
Drupal\ |
core/ |
Enables testing of dependency calculation. | 1 | 1 | |
| ConfigEntityBundleBase | abstract class |
Drupal\ |
core/ |
A base class for config entity types that act as bundles. | 9 | 9 | |
| ConfigEntityDenormalizer | final class |
Drupal\ |
core/ |
Converts the Drupal config entity object to a JSON:API array structure. | 2 | ||
| ConfigEntityDependency | class |
Drupal\ |
core/ |
Provides a value object to discover configuration dependencies. | 2 | ||
| ConfigEntityDependencyTest | class |
Drupal\ |
core/ |
Tests the ConfigEntityDependency class. | |||
| ConfigEntityFormOverrideTest | class |
Drupal\ |
core/ |
Tests that config overrides do not bleed through in entity forms and lists. | |||
| ConfigEntityIdLengthException | class |
Drupal\ |
core/ |
Defines an exception thrown when a configuration entity ID is too long. | 5 | ||
| ConfigEntityImportTest | class |
Drupal\ |
core/ |
Tests ConfigEntity importing. | |||
| ConfigEntityInterface | interface |
Drupal\ |
core/ |
Defines a common interface for configuration entities. | 32 | 60 | |
| ConfigEntityListBuilder | class |
Drupal\ |
core/ |
Defines the default class to build a listing of configuration entities. | 20 | 19 | |
| ConfigEntityListMultilingualTest | class |
Drupal\ |
core/ |
Tests the listing of configuration entities in a multilingual scenario. | |||
| ConfigEntityListTest | class |
Drupal\ |
core/ |
Tests the listing of configuration entities. | |||
| ConfigEntityMapper | class |
Drupal\ |
core/ |
Configuration mapper for configuration entities. | 2 | 3 | |
| ConfigEntityMapperTest | class |
Drupal\ |
core/ |
Tests the functionality provided by the configuration entity mapper. | |||
| ConfigEntityNormalizer | class |
Drupal\ |
core/ |
Normalizes/denormalizes Drupal config entity objects into an array structure. | 1 | 2 | 2 |
| ConfigEntityNormalizerTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\serialization\Normalizer\ConfigEntityNormalizer @group serialization | |||
| ConfigEntityNormalizeTest | class |
Drupal\ |
core/ |
Tests the listing of configuration entities. | |||
| ConfigEntityQueryTest | class |
Drupal\ |
core/ |
Tests Config Entity Query functionality. | |||
| ConfigEntityStaticCacheTest | class |
Drupal\ |
core/ |
Tests the entity static cache when used by config entities. | |||
| ConfigEntityStatusTest | class |
Drupal\ |
core/ |
Tests configuration entity status functionality. | |||
| ConfigEntityStatusUITest | class |
Drupal\ |
core/ |
Tests configuration entity status UI functionality. | |||
| ConfigEntityStorage | class |
Drupal\ |
core/ |
Defines the storage class for configuration entities. | 9 | 16 | |
| ConfigEntityStorageClassException | class |
Drupal\ |
core/ |
Thrown when a storage class is not an instance of ConfigEntityStorage. | 2 | ||
| ConfigEntityStorageInterface | interface |
Drupal\ |
core/ |
Provides an interface for configuration entity storage. | 4 | 5 | |
| ConfigEntityStorageTest | class |
Drupal\ |
core/ |
Tests sync and importing config entities with IDs and UUIDs that match existing config. | |||
| ConfigEntityStorageTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Config\Entity\ConfigEntityStorage @group Config | |||
| ConfigEntityTest | class |
Drupal\ |
core/ |
Tests configuration entities. | |||
| ConfigEntityTest | class |
Drupal\ |
core/ |
Tests the Config operations through the UI. | |||
| ConfigEntityType | class |
Drupal\ |
core/ |
Provides an implementation of a configuration entity type and its metadata. | 4 | ||
| ConfigEntityType | class |
Drupal\ |
core/ |
Defines a config entity type annotation object. | |||
| ConfigEntityTypeInterface | interface |
Drupal\ |
core/ |
Provides an interface for a configuration entity type and its metadata. | 1 | 10 | |
| ConfigEntityTypeTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Config\Entity\ConfigEntityType @group Config | |||
| ConfigEntityUnitTest | class |
Drupal\ |
core/ |
Unit tests for configuration entity base methods. | |||
| ConfigEntityUpdater | class |
Drupal\ |
core/ |
A utility class to make updating configuration entities simple. | 9 | ||
| ConfigEntityUpdaterTest | class |
Drupal\ |
core/ |
Tests \Drupal\Core\Config\Entity\ConfigEntityUpdater. |