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 |
---|---|---|---|---|---|---|---|---|
DeferCallback | final class | Revolt\EventLoop\Internal | vendor/ |
@internal | ||||
Deferred | final class | React\Promise | vendor/ |
@template T | ||||
DeferringDispatcher | final class | PHPUnit\Event | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
DefinedTest | class | Twig\Node\Expression\Test | vendor/ |
Checks if a variable is defined in the current context. | 3 | |||
Definition | class | Symfony\Component\DependencyInjection | vendor/ |
Definition represents a service definition. | 1 | 62 | ||
DefinitionErrorExceptionPass | class | Symfony\Component\DependencyInjection\Compiler | vendor/ |
Throws an exception for any Definitions that have errors and still exist. | ||||
DegradedNumberConverter | DegradedNumberConverter is no longer necessary for converting numbers on 32-bit systems. Transition to { |
class | Ramsey\Uuid\Converter\Number | vendor/ |
@psalm-immutable | |||
DegradedTimeConverter | DegradedTimeConverter is no longer necessary for converting time on 32-bit systems. Transition to { |
class | Ramsey\Uuid\Converter\Time | vendor/ |
@psalm-immutable | 1 | ||
DegradedUuid | DegradedUuid is no longer necessary to represent UUIDs on 32-bit systems. Transition typehints to { |
class | Ramsey\Uuid | vendor/ |
@psalm-immutable | 1 | ||
DegradedUuidBuilder | DegradedUuid instances are no longer necessary to support 32-bit systems. Transition to { |
class | Ramsey\Uuid\Builder | vendor/ |
@psalm-immutable | |||
DelayableQueueInterface | interface | Drupal\Core\Queue | core/ |
Delayable queue interface. | 1 | 1 | ||
DelayedEnvelope | final class | Symfony\Component\Mailer | vendor/ |
@author Fabien Potencier <fabien@symfony.com> | ||||
DelayedRequeueException | class | Drupal\Core\Queue | core/ |
Throw this exception to leave an item in the queue until its lock expires. | 1 | |||
DelayedStalenessHandler | final class | OpenTelemetry\SDK\Metrics\StalenessHandler | vendor/ |
@internal | ||||
DelayedStalenessHandlerFactory | final class | OpenTelemetry\SDK\Metrics\StalenessHandler | vendor/ |
|||||
Delete | class | Drupal\mysql\Driver\Database\mysql | core/ |
MySQL implementation of \Drupal\Core\Database\Query\Delete. | ||||
Delete | class | Drupal\Core\Database\Query | core/ |
General class for an abstracted DELETE operation. | 3 | 4 | ||
Delete | class | Drupal\pgsql\Driver\Database\pgsql | core/ |
PostgreSQL implementation of \Drupal\Core\Database\Query\Delete. | ||||
Delete | class | Drupal\sqlite\Driver\Database\sqlite | core/ |
SQLite implementation of \Drupal\Core\Database\Query\Delete. | ||||
DeleteAction | class | Drupal\Core\Action\Plugin\Action | core/ |
Redirects to an entity deletion form. | ||||
DeleteDefaultLanguageException | class | Drupal\language\Exception | core/ |
Exception thrown when deleting the default language. | 1 | |||
DeletedFieldsRepository | class | Drupal\Core\Field | core/ |
Provides a repository for deleted field and field storage objects. | ||||
DeletedFieldsRepositoryInterface | interface | Drupal\Core\Field | core/ |
Provides an interface for a deleted fields repository. | 1 | 2 | ||
DeletedWorkspaceConstraint | class | Drupal\workspaces\Plugin\Validation\Constraint | core/ |
Deleted workspace constraint. | ||||
DeletedWorkspaceConstraintValidator | class | Drupal\workspaces\Plugin\Validation\Constraint | core/ |
Checks if data still exists for a deleted workspace ID. | ||||
DeleteForm | class | Drupal\comment\Form | core/ |
Provides the comment delete confirmation form. | 1 | |||
DeleteMultiple | class | Drupal\node\Form | core/ |
Provides a node deletion confirmation form. | 1 | 1 | ||
DeleteMultipleForm | class | Drupal\Core\Entity\Form | core/ |
Provides an entities deletion confirmation form. | 2 | 3 | ||
Delta | final class | OpenTelemetry\SDK\Metrics\Stream | vendor/ |
@internal @phan-file-suppress PhanUndeclaredTypeParameter, PhanUndeclaredTypeProperty | ||||
DeltaStorage | final class | OpenTelemetry\SDK\Metrics\Stream | vendor/ |
@internal @phan-file-suppress PhanUndeclaredTypeParameter, PhanUndeclaredTypeProperty | ||||
DemoteNode | class | Drupal\node\Plugin\Action | core/ |
Demotes a node. | ||||
DemoUmamiContentHooks | class | Drupal\demo_umami_content\Hook | core/ |
Hook implementations for demo_umami_content. | ||||
DenormalizableInterface | interface | Symfony\Component\Serializer\Normalizer | vendor/ |
Defines the most basic interface a class must implement to be denormalizable. | ||||
DenormalizerAwareInterface | interface | Symfony\Component\Serializer\Normalizer | vendor/ |
@author Joel Wurtz <joel.wurtz@gmail.com> | 2 | 2 | ||
DenormalizerAwareTrait | trait | Symfony\Component\Serializer\Normalizer | vendor/ |
@author Joel Wurtz <joel.wurtz@gmail.com> | ||||
DenormalizerInterface | interface | Symfony\Component\Serializer\Normalizer | vendor/ |
@author Jordi Boggiano <j.boggiano@seld.be> | 23 | 14 | ||
DenyAdminRoutes | class | Drupal\dynamic_page_cache\PageCache\ResponsePolicy | core/ |
Cache policy for routes with the '_admin_route' option set. | 2 | |||
DenyNoCacheRoutes | class | Drupal\Core\PageCache\ResponsePolicy | core/ |
Cache policy for routes with the 'no_cache' option set. | ||||
DenyNodePreview | class | Drupal\node\PageCache | core/ |
Cache policy for node preview page. | 2 | |||
DenyPrivateImageStyleDownload | class | Drupal\image\PageCache | core/ |
Cache policy for image preview page. | 2 | |||
Dependencies | final class | PHPUnit\Metadata\Api | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 1 | |||
DependenciesArraySniff | class | Drupal\Sniffs\InfoFiles | vendor/ |
Dependencies should be an array in .info.yml files. | ||||
Dependency | class | Drupal\Core\Extension | core/ |
A value object representing dependency information. | 3 | |||
DependencyResolver | final class | OpenTelemetry\SDK\Common\Adapter\HttpDiscovery | vendor/ |
|||||
DependencyResolverInterface | interface | OpenTelemetry\SDK\Common\Http | vendor/ |
1 | 1 | |||
DependencySerializationTrait | trait | Drupal\Core\DependencyInjection | core/ |
Provides dependency injection friendly methods for serialization. | 51 | |||
DependencySerializationTraitPropertyRule | final class | mglaman\PHPStanDrupal\Rules\Drupal | vendor/ |
@implements Rule<ClassPropertyNode> | ||||
DependencyTrait | trait | Drupal\Core\Entity | core/ |
Provides a trait for managing an object's dependencies. | 6 | |||
DependentAccessInterface | interface | Drupal\block_content\Access | core/ |
Interface for AccessibleInterface objects that have an access dependency. | 1 | 1 | ||
DependentPluginDefinitionInterface | interface | Drupal\Core\Plugin\Definition | core/ |
Provides an interface for a plugin definition that has dependencies. | 1 | 2 |