Classes, traits, and interfaces in Drupal 8
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 |
|---|---|---|---|---|---|---|---|
| ComposerIntegrationTrait | trait |
Drupal\ |
core/ |
Some utility functions for testing the Composer integration. | 2 | ||
| ComposerProjectTemplatesTest | class |
Drupal\ |
core/ |
Demonstrate that Composer project templates are buildable as patched. | |||
| ComposerScaffoldCommand | class |
Drupal\ |
composer/ |
The "drupal:scaffold" command class. | |||
| ComposerTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Composer\Composer @group Composer | |||
| ComposerValidateTest | class |
Drupal\ |
core/ |
@group Composer @requires externalCommand composer | |||
| CompositeConstraintBase | abstract class |
Drupal\ |
core/ |
Provides a base class for constraints validating multiple fields. | 4 | 6 | |
| CompositeFormElementTrait | trait |
Drupal\ |
core/ |
Provides a trait for radios, checkboxes, and similar composite form elements. | |||
| ComputedFieldTest | class |
Drupal\ |
core/ |
Provides some integration tests for the Field handler. | |||
| ComputedFileUrl | class |
Drupal\ |
core/ |
Computed file URL property class. | 2 | ||
| ComputedFileUrlTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\file\ComputedFileUrl | |||
| ComputedItemListTrait | trait |
Drupal\ |
core/ |
Provides common functionality for computed item lists. | 4 | ||
| ComputedReferenceTestFieldItemList | class |
Drupal\ |
core/ |
A computed entity reference field item list. | 1 | ||
| ComputedString | class |
Drupal\ |
core/ |
A computed property for test strings. | 1 | ||
| ComputedTestFieldItemList | class |
Drupal\ |
core/ |
A computed field item list. | 1 | ||
| Concat | class |
Drupal\ |
core/ |
Concatenates a set of strings. | 1 | 2 | |
| ConcatTest | class |
Drupal\ |
core/ |
Tests the concat process plugin. | |||
| Condition | class |
Drupal\ |
core/ |
Defines a condition plugin annotation object. | |||
| Condition | class |
Drupal\ |
core/ |
Generic class for a series of conditions in a query. | 35 | ||
| Condition | class |
Drupal\ |
core/ |
Defines the condition class for the config entity query. | 1 | 1 | |
| Condition | class |
Drupal\ |
core/ |
Defines the condition class for the key value entity query. | |||
| Condition | class |
Drupal\ |
core/ |
Implements entity query conditions for SQL databases. | 1 | 1 | |
| Condition | class |
Drupal\ |
core/ |
Defines the condition class for the null entity query. | |||
| Condition | class |
Drupal\ |
core/ |
Implements entity query conditions for PostgreSQL databases. | |||
| ConditionAccessResolverTrait | trait |
Drupal\ |
core/ |
Resolves a set of conditions. | 1 | ||
| ConditionAccessResolverTraitTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Condition\ConditionAccessResolverTrait @group Condition | |||
| ConditionAggregate | class |
Drupal\ |
core/ |
Defines the aggregate condition for sql based storage. | 1 | ||
| ConditionAggregateBase | abstract class |
Drupal\ |
core/ |
Defines a common base class for all aggregation entity condition implementations. | 1 | 1 | |
| ConditionAggregateInterface | interface |
Drupal\ |
core/ |
Defines aggregated entity query conditions. | 1 | 1 | |
| ConditionBase | abstract class |
Drupal\ |
core/ |
Defines a common base class for all entity condition implementations. | 3 | 3 | |
| ConditionFormTest | class |
Drupal\ |
core/ |
Tests that condition plugins basic form handling is working. | |||
| ConditionFundamentals | abstract class |
Drupal\ |
core/ |
Common code for all implementations of the entity query condition interfaces. | 2 | ||
| ConditionInterface | interface |
Drupal\ |
core/ |
An interface for condition plugins. | 1 | ||
| ConditionInterface | interface |
Drupal\ |
core/ |
Defines the entity query condition interface. | 1 | 2 | |
| ConditionInterface | interface |
Drupal\ |
core/ |
Interface for a conditional clause in a query. | 5 | 2 | |
| ConditionManager | class |
Drupal\ |
core/ |
A plugin manager for condition plugins. | 1 | 2 | |
| ConditionPluginBase | abstract class |
Drupal\ |
core/ |
Provides a basis for fulfilling contexts for condition plugins. | 10 | 10 | |
| ConditionPluginCollection | class |
Drupal\ |
core/ |
Provides a collection of condition plugins. | 1 | ||
| ConditionTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Database\Query\Condition | |||
| ConditionTestDualUser | class |
Drupal\ |
core/ |
Provides a condition that requires two users. | |||
| ConditionTestDualUserTest | class |
Drupal\ |
core/ |
Tests a condition that requires two users. | |||
| ConditionTestNoExistingType | class |
Drupal\ |
core/ |
Provides a condition that has a no existing context. | |||
| Config | class |
Drupal\ |
composer/ |
Determine configuration. | 2 | ||
| Config | class |
Drupal\ |
core/ |
Defines the default configuration object. | 1 | 26 | |
| Config | class |
Drupal\ |
core/ |
Provides Configuration Management destination plugin. | 1 | 4 | |
| Config | class |
Drupal\ |
core/ |
Drupal config source from database. | |||
| ConfigAccessTest | class |
Drupal\ |
core/ |
Tests handling of configuration overrides. | |||
| ConfigAfterInstallerTestBase | abstract class |
Drupal\ |
core/ |
Provides a class for install profiles to check their installed config. | 2 | ||
| ConfigAfterInstallerTestBase Deprecated | abstract class |
Drupal\ |
core/ |
Provides a class for install profiles to check their installed config. | |||
| ConfigBase | abstract class |
Drupal\ |
core/ |
Provides a base class for configuration objects with get/set support. | 2 | 2 | |
| ConfigCacheTag | class |
Drupal\ |
core/ |
A subscriber invalidating cache tags when system config objects are saved. | 2 |