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 |
---|---|---|---|---|---|---|---|---|
Drupal | class | core/ |
Static Service Container wrapper. | 7 | ||||
DrupalAspectsOfCKEditor5Plugin | class | Drupal\ckeditor5\Attribute | core/ |
|||||
DrupalAspectsOfCKEditor5Plugin | class | Drupal\ckeditor5\Annotation | core/ |
Defines the "Drupal aspects of a CKEditor5Plugin" annotation object. | ||||
DrupalAutoloader | class | mglaman\PHPStanDrupal\Drupal | vendor/ |
1 | ||||
DrupalClassResolverDynamicReturnTypeExtension | class | mglaman\PHPStanDrupal\Type | vendor/ |
|||||
DrupalClassResolverDynamicStaticReturnTypeExtension | class | mglaman\PHPStanDrupal\Type | vendor/ |
|||||
DrupalClassResolverReturnType | final class | mglaman\PHPStanDrupal\Type | vendor/ |
|||||
DrupalCoreComposer | class | Drupal\Composer\Generator\Util | composer/ |
Utilities for accessing composer.json data from drupal/drupal and drupal/core. | 4 | |||
DrupalCoreRecommendedBuilder | class | Drupal\Composer\Generator\Builder | composer/ |
Builder to produce metapackage for drupal/core-recommended. | 1 | |||
DrupalDateTime | class | Drupal\Core\Datetime | core/ |
Extends DateTimePlus(). | 20 | |||
DrupalDevDependenciesBuilder | class | Drupal\Composer\Generator\Builder | composer/ |
Builder to produce metapackage for drupal/core-dev. | 1 | |||
DrupalFinder | in drupal-finder:1.3.0 and is removed from drupal-finder:2.0.0. Use \DrupalFinder\DrupalFinderComposerRuntime instead. |
class | DrupalFinder | vendor/ |
||||
DrupalFinderComposerRuntime | class | DrupalFinder | vendor/ |
1 | ||||
DrupalInstaller | class | Composer\Installers | vendor/ |
|||||
DrupalKernel | class | Drupal\Core | core/ |
The DrupalKernel class is the core of Drupal itself. | 4 | 21 | ||
DrupalKernelInterface | interface | Drupal\Core | core/ |
The interface for DrupalKernel, the core of Drupal. | 1 | 9 | ||
DrupalPackageBuilder | abstract class | Drupal\Composer\Generator\Builder | composer/ |
Base class that includes helpful utility routine for Drupal builder classes. | 3 | |||
DrupalPinnedDevDependenciesBuilder | class | Drupal\Composer\Generator\Builder | composer/ |
Builder to produce metapackage for drupal/core-dev-pinned. | 1 | |||
DrupalServiceDefinition | class | mglaman\PHPStanDrupal\Drupal | vendor/ |
4 | ||||
DrupalServiceDynamicReturnTypeExtension | class | mglaman\PHPStanDrupal\Type | vendor/ |
|||||
DrupalSqlBase | abstract class | Drupal\migrate_drupal\Plugin\migrate\source | core/ |
A base class for source plugins using a Drupal database as a source. | 60 | 58 | ||
DrupalStaticEntityQueryDynamicReturnTypeExtension | class | mglaman\PHPStanDrupal\Type | vendor/ |
|||||
DrupalStubFilesExtension | final class | mglaman\PHPStanDrupal\Drupal | vendor/ |
|||||
DrupalTranslator | class | Drupal\Core\Validation | core/ |
Translates strings using Drupal's translation system. | 2 | |||
DsCaster | class | Symfony\Component\VarDumper\Caster | vendor/ |
Casts Ds extension classes to array representation. | ||||
Dsn | final class | Symfony\Component\Mailer\Transport | vendor/ |
@author Konstantin Myakshin <molodchick@gmail.com> | 7 | |||
DsPairStub | class | Symfony\Component\VarDumper\Caster | vendor/ |
@author Nicolas Grekas <p@tchwork.com> | ||||
DummyFile | class | PHP_CodeSniffer\Files | vendor/ |
1 | ||||
DummyQueryTrait | trait | Drupal\migrate\Plugin\migrate\source | core/ |
Provides a dummy select query object for source plugins. | 2 | |||
DumpAutoloadCommand | class | Composer\Command | vendor/ |
@author Jordi Boggiano <j.boggiano@seld.be> | ||||
DumpCompletionCommand | final class | Symfony\Component\Console\Command | vendor/ |
Dumps the completion script for the current shell. | 1 | |||
DumpDataCollector | class | Symfony\Component\HttpKernel\DataCollector | vendor/ |
@author Nicolas Grekas <p@tchwork.com> | ||||
DumpDescriptorInterface | interface | Symfony\Component\VarDumper\Command\Descriptor | vendor/ |
@author Maxime Steinhausser <maxime.steinhausser@gmail.com> | 2 | 1 | ||
Dumper | abstract class | Symfony\Component\DependencyInjection\Dumper | vendor/ |
Dumper is the abstract class for all built-in dumpers. | 5 | 1 | ||
Dumper | final class | Symfony\Component\Console\Helper | vendor/ |
@author Roland Franssen <franssen.roland@gmail.com> | 2 | |||
Dumper | class | Symfony\Component\Yaml | vendor/ |
Dumper dumps PHP variables to YAML strings. | 3 | |||
DumperInterface | interface | Symfony\Component\DependencyInjection\Dumper | vendor/ |
DumperInterface is the interface implemented by service container dumper classes. | 1 | |||
DumperInterface | interface | Symfony\Component\DependencyInjection\LazyProxy\PhpDumper | vendor/ |
Lazy proxy dumper capable of generating the instantiation logic PHP code for proxied services. | 2 | 1 | ||
DumperInterface | interface | Symfony\Component\VarDumper\Cloner | vendor/ |
DumperInterface used by Data objects. | 1 | 1 | ||
DumpException | class | Symfony\Component\Yaml\Exception | vendor/ |
Exception class thrown when an error occurs during dumping. | 1 | |||
DumpListener | class | Symfony\Component\HttpKernel\EventListener | vendor/ |
Configures dump() handler. | ||||
DumpServer | class | Symfony\Component\VarDumper\Server | vendor/ |
A server collecting Data clones sent by a ServerDumper. | 1 | |||
DuplicateAssignmentToVariableSniff | class | SlevomatCodingStandard\Sniffs\Variables | vendor/ |
|||||
DuplicateClassDefinitionSniff | class | PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS | vendor/ |
|||||
DuplicateClassNameSniff | class | PHP_CodeSniffer\Standards\Generic\Sniffs\Classes | vendor/ |
|||||
DuplicateConfigActionIdException | class | Drupal\Core\Config\Action | core/ |
Exception thrown if there are conflicting shorthand action IDs. | ||||
DuplicateEntrySniff | class | Drupal\Sniffs\InfoFiles | vendor/ |
Make sure that entries in info files are specified only once. | ||||
DuplicateInfoFileValidator | final class | Drupal\package_manager\Validator | core/ |
Validates the stage does not have duplicate info.yml not present in active. | ||||
DuplicateKeyException | class | Seld\JsonLint | vendor/ |
1 | ||||
DuplicateMethodException | final class | PHPUnit\Framework\MockObject\Generator | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 1 |