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 |
|---|---|---|---|---|---|---|---|
| CommentTypeJsonBasicAuthTest | class |
Drupal\ |
core/ |
@group rest | |||
| CommentTypeJsonCookieTest | class |
Drupal\ |
core/ |
@group rest | |||
| CommentTypeListBuilder | class |
Drupal\ |
core/ |
Defines a class to build a listing of comment type entities. | |||
| CommentTypeResourceTestBase | abstract class |
Drupal\ |
core/ |
ResourceTestBase for CommentType entity. | 10 | 4 | |
| CommentTypeResourceTestBase Deprecated | abstract class |
Drupal\ |
core/ |
||||
| CommentTypeTest | class |
Drupal\ |
core/ |
JSON:API integration test for the "CommentType" config entity type. | |||
| CommentTypeTest | class |
Drupal\ |
core/ |
Ensures that comment type functions work correctly. | |||
| CommentTypeTest | class |
Drupal\ |
core/ |
Tests D7 comment type source plugin. | |||
| CommentTypeXmlAnonTest | class |
Drupal\ |
core/ |
@group rest | |||
| CommentTypeXmlBasicAuthTest | class |
Drupal\ |
core/ |
@group rest | |||
| CommentTypeXmlCookieTest | class |
Drupal\ |
core/ |
@group rest | |||
| CommentUninstallTest | class |
Drupal\ |
core/ |
Tests comment module uninstall. | |||
| CommentUpdateTest | class |
Drupal\ |
core/ |
Tests that comment settings are properly updated during database updates. | |||
| CommentUserNameTest | class |
Drupal\ |
core/ |
Tests comment user name field | |||
| CommentValidationTest | class |
Drupal\ |
core/ |
Tests comment validation constraints. | |||
| CommentVariable Deprecated | class |
Drupal\ |
core/ |
Plugin annotation @MigrateSource( id = "d6_comment_variable", source_module = "comment" ) | 1 | ||
| CommentVariablePerCommentType Deprecated | class |
Drupal\ |
core/ |
Plugin annotation @MigrateSource( id = "d6_comment_variable_per_comment_type", source_module = "comment" ) | |||
| CommentVariablePerCommentTypeTest | class |
Drupal\ |
core/ |
Tests comment variable per comment type source plugin. | |||
| CommentVariableTest | class |
Drupal\ |
core/ |
Tests d6_comment_variable source plugin. | |||
| CommentViewBuilder | class |
Drupal\ |
core/ |
View builder handler for comments. | |||
| CommentViewsData | class |
Drupal\ |
core/ |
Provides views data for the comment entity type. | |||
| CommentViewsFieldAccessTest | class |
Drupal\ |
core/ |
Tests base field access in Views for the comment entity. | |||
| CommentViewsKernelTestBase | abstract class |
Drupal\ |
core/ |
Provides a common test base for comment views tests. | 1 | ||
| CommentWidget | class |
Drupal\ |
core/ |
Provides a default comment widget. | |||
| CommentXmlAnonTest | class |
Drupal\ |
core/ |
@group rest | |||
| CommentXmlBasicAuthTest | class |
Drupal\ |
core/ |
@group rest | |||
| CommentXmlCookieTest | class |
Drupal\ |
core/ |
@group rest | |||
| CommonCollectionFilterAccessTestPatternsTrait | trait |
Drupal\ |
core/ |
Provides common filter access control tests. | 9 | ||
| CommonDataConverter | class |
Drupal\ |
core/ |
Contains methods for common data conversions. | |||
| CommonTestController | class |
Drupal\ |
core/ |
Controller routines for common_test routes. | |||
| CompatibilityFixTest | class |
Drupal\ |
core/ |
Tests that extensions that are incompatible with the current core version are disabled. | |||
| CompiledRoute | class |
Drupal\ |
core/ |
A compiled route contains derived information from a route object. | |||
| ComplexDataConstraint | class |
Drupal\ |
core/ |
Complex data constraint. | |||
| ComplexDataConstraintValidator | class |
Drupal\ |
core/ |
Validates complex data. | |||
| ComplexDataConstraintValidatorTest | class |
Drupal\ |
core/ |
Tests ComplexData validation constraint with both valid and invalid values for a key. | |||
| ComplexDataDefinitionBase | abstract class |
Drupal\ |
core/ |
Base class for complex data definitions. | 2 | 1 | |
| ComplexDataDefinitionInterface | interface |
Drupal\ |
core/ |
Interface for complex data definitions. | 3 | 7 | |
| ComplexDataInterface | interface |
Drupal\ |
core/ |
Interface for complex data; i.e. data containing named and typed properties. | 4 | 15 | |
| ComplexDataNormalizer | class |
Drupal\ |
core/ |
Converts the Drupal entity object structures to a normalized array. | 3 | 1 | 2 |
| ComplexDataNormalizerTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\serialization\Normalizer\ComplexDataNormalizer @group serialization | |||
| ComplexTestType | class |
Drupal\ |
core/ |
Test workflow type. | |||
| ComplexTestTypeConfigureForm | class |
Drupal\ |
core/ |
Form to configure the complex test workflow type. | |||
| ComplexTestTypeStateForm | class |
Drupal\ |
core/ |
Form to configure the complex test workflow states. | |||
| ComplexTestTypeTransitionForm | class |
Drupal\ |
core/ |
Form to configure the complex test workflow states. | |||
| ComplexWorkflowTypeTest | class |
Drupal\ |
core/ |
Workflow entity tests that require modules or storage. | |||
| ComponentEntityDisplayBase | abstract class |
Drupal\ |
core/ |
Provides a destination plugin for migrating entity display components. | 3 | 2 | |
| Composer | class |
Drupal\ |
composer/ |
Provides static functions for composer script events. See also core/lib/Drupal/Composer/Composer.php, which contains similar scripts needed by projects that include drupal/core. Scripts that are only needed by drupal/drupal go here. | 5 | ||
| Composer | class |
Drupal\ |
core/ |
Provides static functions for composer script events. | |||
| ComposerHookTest | class |
Drupal\ |
core/ |
Tests Composer Hooks that run scaffold operations. | |||
| ComposerIntegrationTest | class |
Drupal\ |
core/ |
Tests Composer integration. |