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 |
|---|---|---|---|---|---|---|---|---|
| ComponentsTaggedReleaseTest | class | Drupal\BuildTests\Composer\Component | core/ |
Demonstrate that the Component generator responds to release tagging. | ||||
| ComponentsTwigExtension | final class | Drupal\Core\Template | core/ |
The twig extension so Drupal can recognize the new code. | ||||
| ComponentTestDoesNotExtendCoreTest | final class | Drupal\PHPStan\Rules | core/ |
Ensures that no component tests are extending a core test base class. | 1 | |||
| ComponentTestDoesNotExtendCoreTestTest | class | Drupal\PHPStan\Tests | core/ |
Tests ComponentTestDoesNotExtendCoreTest rule. | ||||
| ComponentValidator | class | Drupal\Core\Theme\Component | core/ |
Validates a component based on its definition and the component schema. | 3 | |||
| ComponentValidatorTest | class | Drupal\Tests\Core\Theme\Component | core/ |
Unit tests for the component validation. | ||||
| Composer | class | Drupal\Core\Composer | core/ |
Provides static functions for composer script events. | ||||
| Composer | class | Drupal\Composer | composer/ |
Provides static functions for composer script events. | 9 | |||
| ComposerBuildTestBase | abstract class | Drupal\BuildTests\Composer | core/ |
Base class for Composer build tests. | 3 | 3 | ||
| ComposerHookTest | class | Drupal\Tests\Composer\Plugin\Scaffold\Functional | core/ |
Tests Composer Hooks that run scaffold operations. | ||||
| ComposerInspector | class | Drupal\package_manager | core/ |
Defines a class to get information from Composer. | 22 | |||
| ComposerInspectorTest | class | Drupal\Tests\package_manager\Kernel | core/ |
Tests Drupal\package_manager\ComposerInspector. | ||||
| ComposerInstallersTrait | trait | Drupal\Tests\package_manager\Traits | core/ |
A utility for kernel tests that need to use 'composer/installers'. | 3 | |||
| ComposerIntegrationTest | class | Drupal\Tests | core/ |
Tests Composer integration. | ||||
| ComposerIntegrationTrait | trait | Drupal\Tests\Composer | core/ |
Some utility functions for testing the Composer integration. | 2 | |||
| ComposerMinimumStabilityValidator | final class | Drupal\package_manager\Validator | core/ |
Checks that the packages to install meet the minimum stability. | 1 | |||
| ComposerMinimumStabilityValidatorTest | class | Drupal\Tests\package_manager\Kernel | core/ |
Tests Composer Minimum Stability Validator. | ||||
| ComposerNotReadyException | final class | Drupal\package_manager\Exception | core/ |
Exception thrown if we cannot reliably use Composer. | 2 | |||
| ComposerPatches | class | cweagans\Fake | core/ |
Dummy composer plugin implementation. | ||||
| ComposerPatchesValidator | final class | Drupal\package_manager\Validator | core/ |
Validates the configuration of the cweagans/composer-patches plugin. | 1 | |||
| ComposerPatchesValidatorTest | class | Drupal\Tests\package_manager\Kernel | core/ |
Tests Composer Patches Validator. | ||||
| ComposerPluginImplementsScaffoldEvents | class | Drupal\Tests\fixture\Composer\Plugin | core/ |
A fixture composer plugin implement Drupal scaffold events. | ||||
| ComposerPluginsValidator | final class | Drupal\package_manager\Validator | core/ |
Validates the allowed Composer plugins, both in active and stage. | 4 | |||
| ComposerPluginsValidatorComplexInvalidTest | class | Drupal\Tests\package_manager\Kernel | core/ |
Tests Composer Plugins Validator Complex Invalid. | ||||
| ComposerPluginsValidatorInsecureTest | class | Drupal\Tests\package_manager\Kernel | core/ |
Tests Composer Plugins Validator Insecure. | ||||
| ComposerPluginsValidatorSimpleInvalidTest | class | Drupal\Tests\package_manager\Kernel | core/ |
Tests Composer Plugins Validator Simple Invalid. | ||||
| ComposerPluginsValidatorSimpleValidTest | class | Drupal\Tests\package_manager\Kernel | core/ |
Tests Composer Plugins Validator Simple Valid. | ||||
| ComposerPluginsValidatorTestBase | abstract class | Drupal\Tests\package_manager\Kernel | core/ |
@internal | 3 | |||
| ComposerProjectTemplatesTest | class | Drupal\BuildTests\Composer\Template | core/ |
Demonstrate that Composer project templates can be built as patched. | ||||
| ComposerRequirementTest | class | Drupal\Tests\package_manager\Functional | core/ |
Tests that Package Manager shows the Composer version on the status report. | ||||
| ComposerRunner | final class | Drupal\package_manager | core/ |
Runs Composer through the current PHP interpreter. | 1 | 2 | ||
| ComposerRunnerTest | class | Drupal\Tests\package_manager\Unit | core/ |
Tests Package Manager's Composer runner service. | ||||
| ComposerScaffoldCommand | class | Drupal\Composer\Plugin\Scaffold | composer/ |
The "drupal:scaffold" command class. | ||||
| ComposerStagerExceptionTrait | trait | Drupal\package_manager_bypass | core/ |
Trait to make Composer Stager throw pre-determined exceptions in tests. | ||||
| ComposerStagerTestTrait | trait | Drupal\Tests\package_manager\Traits | core/ |
Contains helper methods for testing Composer Stager interactions. | 1 | |||
| ComposerTest | class | Drupal\Tests\Composer | core/ |
Tests Drupal\Composer\Composer. | ||||
| ComposerValidateTest | class | Drupal\BuildTests\Composer | core/ |
Tests. | ||||
| ComposerValidator | final class | Drupal\package_manager\Validator | core/ |
Validates the project can be used by the Composer Inspector. | 1 | |||
| ComposerValidatorTest | class | Drupal\Tests\package_manager\Kernel | core/ |
Tests Composer Validator. | ||||
| CompositeConstraintBase | abstract class | Drupal\Core\Entity\Plugin\Validation\Constraint | core/ |
Provides a base class for constraints validating multiple fields. | 4 | 6 | ||
| CompositeFormElementTrait | trait | Drupal\Core\Render\Element | core/ |
Provides a trait for radios, checkboxes, and similar composite form elements. | ||||
| ComputedBundleFieldTest | class | Drupal\Tests\views\Kernel\Handler | core/ |
Provides some integration tests for computed bundle fields. | ||||
| ComputedFieldTest | class | Drupal\Tests\views\Kernel\Handler | core/ |
Provides some integration tests for the Field handler. | ||||
| ComputedFileUrl | class | Drupal\file | core/ |
Computed file URL property class. | 2 | |||
| ComputedFileUrlTest | class | Drupal\Tests\file\Kernel | core/ |
Tests Drupal\file\ComputedFileUrl. | ||||
| ComputedItemListTrait | trait | Drupal\Core\TypedData | core/ |
Provides common functionality for computed item lists. | 7 | |||
| ComputedReferenceTestFieldItemList | class | Drupal\entity_test\Plugin\Field | core/ |
A computed entity reference field item list. | 2 | |||
| ComputedString | class | Drupal\entity_test\TypedData | core/ |
A computed property for test strings. | 2 | |||
| ComputedTestBundleFieldItemList | class | Drupal\entity_test\Plugin\Field | core/ |
A computed field item list for a bundle field. | 1 | |||
| ComputedTestCacheableIntegerItemList | class | Drupal\entity_test\Plugin\Field | core/ |
Item list class for computed cacheable string field. | 1 |
Pagination
- Previous page
- Page 28
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.