Classes, traits, and interfaces - Drupal 11.1.x - Drupal Core
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
File
-
core/
core.api.php, line 1518
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
DependentPluginDefinitionTrait | trait | Drupal\Core\Plugin\Definition | core/ |
Provides a trait for a plugin definition that has dependencies. | 1 | |||
DependentPluginInterface | interface | Drupal\Component\Plugin | core/ |
Provides an interface for a plugin that has dependencies. | 20 | 24 | ||
DependentWithRemovalPluginInterface | interface | Drupal\views\Plugin | core/ |
Provides an interface for a plugin that has dependencies that can be removed. | 2 | 3 | ||
Depends | final class | PHPUnit\Framework\Attributes | vendor/ |
@psalm-immutable | 1 | |||
DependsCommand | class | Composer\Command | vendor/ |
@author Niels Keurentjes <niels.keurentjes@omines.com> | ||||
DependsExternal | final class | PHPUnit\Framework\Attributes | vendor/ |
@psalm-immutable | 1 | |||
DependsExternalUsingDeepClone | final class | PHPUnit\Framework\Attributes | vendor/ |
@psalm-immutable | 1 | |||
DependsExternalUsingShallowClone | final class | PHPUnit\Framework\Attributes | vendor/ |
@psalm-immutable | 1 | |||
DependsOnClass | final class | PHPUnit\Framework\Attributes | vendor/ |
@psalm-immutable | 1 | |||
DependsOnClass | final class | PHPUnit\Metadata | vendor/ |
@psalm-immutable | 2 | |||
DependsOnClassUsingDeepClone | final class | PHPUnit\Framework\Attributes | vendor/ |
@psalm-immutable | 1 | |||
DependsOnClassUsingShallowClone | final class | PHPUnit\Framework\Attributes | vendor/ |
@psalm-immutable | 1 | |||
DependsOnMethod | final class | PHPUnit\Metadata | vendor/ |
@psalm-immutable | 2 | |||
DependsUsingDeepClone | final class | PHPUnit\Framework\Attributes | vendor/ |
@psalm-immutable | 1 | |||
DependsUsingShallowClone | final class | PHPUnit\Framework\Attributes | vendor/ |
@psalm-immutable | 1 | |||
Deprecated | final class | phpDocumentor\Reflection\DocBlock\Tags | vendor/ |
Reflection class for a {deprecated tag in a Docblock. | 1 | |||
DeprecatedAnnotationDeclarationSniff | class | SlevomatCodingStandard\Sniffs\Commenting | vendor/ |
|||||
DeprecatedAnnotationsRuleBase | abstract class | mglaman\PHPStanDrupal\Rules\Deprecations | vendor/ |
@implements Rule<Node\Stmt\Class_> | 2 | |||
DeprecatedArray | class | Drupal\Component\Utility | core/ |
An array that triggers a deprecation warning when accessed. | ||||
DeprecatedCallableInfo | final class | Twig | vendor/ |
@author Fabien Potencier <fabien@symfony.com> | 1 | |||
DeprecatedClassHelper | class | PHPStan\Rules\Deprecations | vendor/ |
|||||
DeprecatedComment | class | Egulias\EmailValidator\Warning | vendor/ |
1 | ||||
DeprecatedFunctionsSniff | class | PHP_CodeSniffer\Standards\Generic\Sniffs\PHP | vendor/ |
|||||
DeprecatedHookImplementation | class | mglaman\PHPStanDrupal\Rules\Deprecations | vendor/ |
@implements Rule<Function_> | ||||
DeprecatedNode | class | Twig\Node | vendor/ |
Represents a deprecated node. | 1 | |||
DeprecatedScopeCheck | final class | mglaman\PHPStanDrupal\Internal | vendor/ |
4 | ||||
DeprecatedScopeHelper | class | PHPStan\Rules\Deprecations | vendor/ |
1 | ||||
DeprecatedScopeResolver | interface | PHPStan\Rules\Deprecations | vendor/ |
This is the interface for custom deprecated scope resolvers. | 4 | 3 | ||
DeprecatedServicePass | class | Drupal\Core\DependencyInjection\Compiler | core/ |
Sets the _deprecated_service_list parameter. | 1 | |||
DeprecatedServicePropertyTrait | trait | Drupal\Core\DependencyInjection | core/ |
Provides a standard way to announce deprecated properties. | 3 | |||
DeprecatedSniff | class | Drupal\Sniffs\Commenting | vendor/ |
Ensures standard format of @ deprecated tag text in docblock. | ||||
DeprecatedSniff | interface | PHP_CodeSniffer\Sniffs | vendor/ |
1 | ||||
DeprecatedStatusCode | class | Opentelemetry\Proto\Trace\V1\Status | vendor/ |
Protobuf type <code>opentelemetry.proto.trace.v1.Status.DeprecatedStatusCode</code> | ||||
DeprecatedTagValueNode | class | PHPStan\PhpDocParser\Ast\PhpDoc | vendor/ |
1 | ||||
DeprecatedTokenParser | final class | Twig\TokenParser | vendor/ |
Deprecates a section of a template. | 1 | |||
DeprecatedUuidInterface | interface | Ramsey\Uuid | vendor/ |
This interface encapsulates deprecated methods for ramsey/uuid | 1 | |||
DeprecatedUuidMethodsTrait | This trait and its methods will be removed in ramsey/uuid 5.0.0. |
trait | Ramsey\Uuid | vendor/ |
This trait encapsulates deprecated methods for ramsey/uuid; this trait and its methods will be removed in ramsey/uuid 5.0.0. | |||
DeprecateTrait | trait | Symfony\Component\DependencyInjection\Loader\Configurator\Traits | vendor/ |
|||||
Deprecation | final class | PHPUnit\Framework\TestStatus | vendor/ |
@psalm-immutable | ||||
Deprecation | class | Doctrine\Deprecations | vendor/ |
Manages Deprecation logging in different ways. | 13 | |||
DeprecationCollector | final class | Twig\Util | vendor/ |
@author Fabien Potencier <fabien@symfony.com> | ||||
DeprecationHelper | final class | Drupal\Component\Utility | core/ |
Provides a helper method for handling deprecated code paths in projects. | 1 | |||
DeprecationHelperScope | final class | mglaman\PHPStanDrupal\DeprecatedScope | vendor/ |
|||||
DeprecationTriggered | final class | PHPUnit\Event\TestRunner | vendor/ |
@psalm-immutable | 3 | |||
DeprecationTriggered | final class | PHPUnit\Event\Test | vendor/ |
@psalm-immutable | 9 | |||
DeprecationTriggeredSubscriber | interface | PHPUnit\Event\TestRunner | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 1 | 1 | ||
DeprecationTriggeredSubscriber | interface | PHPUnit\Event\Test | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 4 | 4 | ||
Depth | class | Drupal\comment\Plugin\views\field | core/ |
Field handler to display the depth of a comment. | ||||
DepthRangeFilterIterator | class | Symfony\Component\Finder\Iterator | vendor/ |
DepthRangeFilterIterator limits the directory depth. | 1 | |||
DerivablePluginDefinitionInterface | interface | Drupal\Component\Plugin\Definition | core/ |
Provides an interface for a derivable plugin definition. | 2 | 3 |