Classes, traits, and interfaces - 11.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 1531
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| CommentViewsHooks | class | Drupal\comment\Hook | core/ |
Hook implementations for comment. | ||||
| CommentViewsKernelTestBase | abstract class | Drupal\Tests\comment\Kernel\Views | core/ |
Provides a common test base for comment views tests. | 2 | |||
| CommentWidget | class | Drupal\comment\Plugin\Field\FieldWidget | core/ |
Provides a default comment widget. | ||||
| CommentXmlAnonTest | class | Drupal\Tests\comment\Functional\Rest | core/ |
Tests Comment Xml Anon. | ||||
| CommentXmlBasicAuthTest | class | Drupal\Tests\comment\Functional\Rest | core/ |
Tests Comment Xml Basic Auth. | ||||
| CommentXmlCookieTest | class | Drupal\Tests\comment\Functional\Rest | core/ |
Tests Comment Xml Cookie. | ||||
| CommonCollectionFilterAccessTestPatternsTrait | trait | Drupal\Tests\jsonapi\Traits | core/ |
Provides common filter access control tests. | 8 | |||
| CommonTestController | class | Drupal\common_test\Controller | core/ |
Controller routines for common_test routes. | ||||
| CommonTestCronHelperHooks | class | Drupal\common_test_cron_helper\Hook | core/ |
Hook implementations for common_test_cron_helper. | ||||
| CommonTestHooks | class | Drupal\common_test\Hook | core/ |
Hook implementations for common_test. | ||||
| CommonTestThemeHooks | class | Drupal\common_test\Hook | core/ |
Hook implementations for common_test. | ||||
| CompiledRoute | class | Drupal\Core\Routing | core/ |
A compiled route contains derived information from a route object. | ||||
| ComplexDataConstraint | class | Drupal\Core\Validation\Plugin\Validation\Constraint | core/ |
Complex data constraint. | ||||
| ComplexDataConstraintValidator | class | Drupal\Core\Validation\Plugin\Validation\Constraint | core/ |
Validates complex data. | ||||
| ComplexDataConstraintValidatorTest | class | Drupal\KernelTests\Core\TypedData | core/ |
Tests ComplexData validation with both valid and invalid values. | ||||
| ComplexDataDefinitionBase | abstract class | Drupal\Core\TypedData | core/ |
Base class for complex data definitions. | 2 | 1 | ||
| ComplexDataDefinitionInterface | interface | Drupal\Core\TypedData | core/ |
Interface for complex data definitions. | 3 | 8 | ||
| ComplexDataInterface | interface | Drupal\Core\TypedData | core/ |
Interface for complex data; i.e. data containing named and typed properties. | 4 | 15 | ||
| ComplexDataNormalizer | class | Drupal\serialization\Normalizer | core/ |
Converts the Drupal entity object structures to a normalized array. | 3 | 1 | 2 | |
| ComplexDataNormalizerTest | class | Drupal\Tests\serialization\Unit\Normalizer | core/ |
Tests Drupal\serialization\Normalizer\ComplexDataNormalizer. | ||||
| ComplexTestType | class | Drupal\workflow_type_test\Plugin\WorkflowType | core/ |
Test workflow type. | 1 | |||
| ComplexTestTypeConfigureForm | class | Drupal\workflow_type_test\Form | core/ |
Form to configure the complex test workflow type. | ||||
| ComplexTestTypeStateForm | class | Drupal\workflow_type_test\Form | core/ |
Form to configure the complex test workflow states. | ||||
| ComplexTestTypeTransitionForm | class | Drupal\workflow_type_test\Form | core/ |
Form to configure the complex test workflow states. | ||||
| ComplexWorkflowTypeTest | class | Drupal\Tests\workflows\Kernel | core/ |
Workflow entity tests that require modules or storage. | ||||
| Component | class | Drupal\Core\Plugin | core/ |
Simple value object that contains information about the component. | 7 | |||
| ComponentElement | class | Drupal\Core\Render\Element | core/ |
Provides a Single-Directory Component render element. | ||||
| ComponentEntityDisplayBase | abstract class | Drupal\migrate\Plugin\migrate\destination | core/ |
Provides a destination plugin for migrating entity display components. | 3 | 2 | ||
| ComponentGenerator | class | Drupal\Composer\Generator | composer/ |
Reconciles Drupal component dependencies with core. | 1 | |||
| ComponentInFormTest | class | Drupal\KernelTests\Components | core/ |
Tests the correct rendering of components in form. | ||||
| ComponentInvalidReplacementTest | class | Drupal\KernelTests\Components | core/ |
Tests invalid render options for components. | ||||
| ComponentKernelTestBase | abstract class | Drupal\KernelTests\Components | core/ |
Defines a base class for component kernel tests. | 8 | |||
| ComponentLoader | class | Drupal\Core\Template\Loader | core/ |
Lets you load templates using the component ID. | 1 | |||
| ComponentLoaderTest | class | Drupal\Tests\Core\Theme\Component | core/ |
Unit tests for the component loader class. | ||||
| ComponentMetadata | class | Drupal\Core\Theme\Component | core/ |
Component metadata. | 2 | |||
| ComponentMetadataTest | class | Drupal\Tests\Core\Theme\Component | core/ |
Unit tests for the component metadata class. | ||||
| ComponentNegotiator | class | Drupal\Core\Theme | core/ |
Determines which component should be used. | 2 | |||
| ComponentNegotiatorTest | class | Drupal\KernelTests\Components | core/ |
Tests the component negotiator. | ||||
| ComponentNodeVisitor | class | Drupal\Core\Template | core/ |
Provides a ComponentNodeVisitor to change the generated parse-tree. | 1 | |||
| ComponentNodeVisitorTest | class | Drupal\KernelTests\Components | core/ |
Tests the node visitor. | ||||
| ComponentNotFoundException | class | Drupal\Core\Render\Component\Exception | core/ |
Raised when a component cannot be found. | 5 | |||
| ComponentPluginManager | class | Drupal\Core\Theme | core/ |
Defines a plugin manager to deal with components. | 8 | 2 | ||
| ComponentPluginManagerCachedDiscoveryTest | class | Drupal\KernelTests\Components | core/ |
Tests discovery of components in a theme being installed or uninstalled. | ||||
| ComponentPluginManagerTest | class | Drupal\KernelTests\Components | core/ |
Tests the component plugin manager. | ||||
| ComponentRenderInvalidTest | class | Drupal\KernelTests\Components | core/ |
Tests invalid render options for components. | ||||
| ComponentRenderTest | class | Drupal\KernelTests\Components | core/ |
Tests the correct rendering of components. | ||||
| ComponentRenderTest | final class | Drupal\KernelTests\Component | core/ |
Tests the correct rendering of components. | ||||
| ComponentRenderTest | class | Drupal\FunctionalTests\Components | core/ |
Tests the correct rendering of components. | ||||
| ComponentRenderTest | class | Drupal\FunctionalJavascriptTests\Components | core/ |
Tests the correct rendering of components. | ||||
| ComponentsIsolatedBuildTest | class | Drupal\BuildTests\Composer\Component | core/ |
Try to install dependencies per component, using Composer. |
Pagination
- Previous page
- Page 27
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.