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 1519
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
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. | ||||
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/ |
@coversDefaultClass \Drupal\package_manager\ComposerInspector[[api-linebreak]] | ||||
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. | ||||
ComposerMinimumStabilityValidatorTest | class | Drupal\Tests\package_manager\Kernel | core/ |
@covers \Drupal\package_manager\Validator\ComposerMinimumStabilityValidator[[api-linebreak]] @group package_manager @internal | ||||
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. | ||||
ComposerPatchesValidatorTest | class | Drupal\Tests\package_manager\Kernel | core/ |
@covers \Drupal\package_manager\Validator\ComposerPatchesValidator[[api-linebreak]] @group package_manager @group #slow @internal | ||||
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. | ||||
ComposerPluginsValidatorComplexInvalidTest | class | Drupal\Tests\package_manager\Kernel | core/ |
@covers \Drupal\package_manager\Validator\ComposerPluginsValidator[[api-linebreak]] @group package_manager @group #slow @internal | ||||
ComposerPluginsValidatorInsecureTest | class | Drupal\Tests\package_manager\Kernel | core/ |
@covers \Drupal\package_manager\Validator\ComposerPluginsValidator[[api-linebreak]] @group package_manager @internal | ||||
ComposerPluginsValidatorSimpleInvalidTest | class | Drupal\Tests\package_manager\Kernel | core/ |
@covers \Drupal\package_manager\Validator\ComposerPluginsValidator[[api-linebreak]] @group package_manager @group #slow @internal | ||||
ComposerPluginsValidatorSimpleValidTest | class | Drupal\Tests\package_manager\Kernel | core/ |
@covers \Drupal\package_manager\Validator\ComposerPluginsValidator[[api-linebreak]] @group #slow @group package_manager @internal | ||||
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. |
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.