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 |
---|---|---|---|---|---|---|---|---|
AuthorFormatter | class | Drupal\user\Plugin\Field\FieldFormatter | core/ |
Plugin implementation of the 'author' formatter. | ||||
AuthorNameFormatter | class | Drupal\comment\Plugin\Field\FieldFormatter | core/ |
Plugin implementation of the 'comment_username' formatter. | ||||
AuthorTagSniff | class | DrupalPractice\Sniffs\Commenting | vendor/ |
Checks the usage of @author tags. | ||||
AutoAddedKeysSniff | class | Drupal\Sniffs\InfoFiles | vendor/ |
"version", "project" and "timestamp" are added automatically by drupal.org packaging scripts. | ||||
AutoAliasServicePass | class | Symfony\Component\DependencyInjection\Compiler | vendor/ |
Sets a service to be an alias of another one, given a format pattern. | ||||
Autoconfigure | class | Symfony\Component\DependencyInjection\Attribute | vendor/ |
An attribute to tell how a base type should be autoconfigured. | 1 | 1 | ||
AutoconfigureFailedException | class | Symfony\Component\DependencyInjection\Exception | vendor/ |
1 | ||||
AutoconfigureTag | class | Symfony\Component\DependencyInjection\Attribute | vendor/ |
An attribute to tell how a base type should be tagged. | ||||
AutoconfigureTrait | trait | Symfony\Component\DependencyInjection\Loader\Configurator\Traits | vendor/ |
|||||
AutoEscapeNode | class | Twig\Node | vendor/ |
Represents an autoescape node. | 2 | |||
AutoEscapeTokenParser | final class | Twig\TokenParser | vendor/ |
Marks a section of a template to be escaped or not. | 1 | |||
AutoExpireFlashBag | class | Symfony\Component\HttpFoundation\Session\Flash | vendor/ |
AutoExpireFlashBag flash message container. | ||||
AutoloadGenerator | class | Composer\Autoload | vendor/ |
@author Igor Wiedler <igor@wiedler.ch> @author Jordi Boggiano <j.boggiano@seld.be> | 3 | |||
AutoMappingStrategy | final class | Symfony\Component\Validator\Mapping | vendor/ |
Specifies how the auto-mapping feature should behave. | 3 | |||
AutoMappingTrait | trait | Symfony\Component\Validator\Mapping\Loader | vendor/ |
Utility methods to create auto mapping loaders. | ||||
AutomatedCron | class | Drupal\automated_cron\EventSubscriber | core/ |
A subscriber running cron after a response is sent. | 2 | |||
AutomatedCronHooks | class | Drupal\automated_cron\Hook | core/ |
Hook implementations for automated_cron. | ||||
AutoRootSpan | class | OpenTelemetry\SDK\Trace | vendor/ |
1 | ||||
Autowire | class | Symfony\Component\DependencyInjection\Attribute | vendor/ |
Attribute to tell a parameter how to be autowired. | 4 | 6 | ||
AutowireAsDecoratorPass | final class | Symfony\Component\DependencyInjection\Compiler | vendor/ |
Reads #[AsDecorator] attributes on definitions that are autowired and don't have the "container.ignore_attributes" tag. | ||||
AutowireCallable | class | Symfony\Component\DependencyInjection\Attribute | vendor/ |
Attribute to tell which callable to give to an argument of type Closure. | 1 | 1 | ||
AutowireDecorated | class | Symfony\Component\DependencyInjection\Attribute | vendor/ |
Autowires the inner object of decorating services. | 1 | |||
AutowireInline | class | Symfony\Component\DependencyInjection\Attribute | vendor/ |
Allows inline service definition for an argument. | 1 | 2 | ||
AutowireIterator | class | Symfony\Component\DependencyInjection\Attribute | vendor/ |
Autowires an iterator of services based on a tag name. | 1 | 3 | ||
AutowireLocator | class | Symfony\Component\DependencyInjection\Attribute | vendor/ |
Autowires a service locator based on a tag name or an explicit list of key => service-type pairs. | 1 | 1 | ||
AutowireMethodOf | class | Symfony\Component\DependencyInjection\Attribute | vendor/ |
Tells which method should be turned into a Closure based on the name of the parameter it's attached to. | ||||
AutowirePass | class | Symfony\Component\DependencyInjection\Compiler | vendor/ |
Inspects existing service definitions and wires the autowired ones using the type hints of their classes. | ||||
AutowireRequiredMethodsPass | class | Symfony\Component\DependencyInjection\Compiler | vendor/ |
Looks for definitions with autowiring enabled and registers their corresponding "#[Required]" methods as setters. | ||||
AutowireRequiredPropertiesPass | class | Symfony\Component\DependencyInjection\Compiler | vendor/ |
Looks for definitions with autowiring enabled and registers their corresponding "#[Required]" properties. | ||||
AutowireServiceClosure | class | Symfony\Component\DependencyInjection\Attribute | vendor/ |
Attribute to wrap a service in a closure that returns it. | 3 | |||
AutowireTrait | trait | Drupal\Core\DependencyInjection | core/ |
Defines a trait for automatically wiring dependencies from the container. | 2 | |||
AutowireTrait | trait | Symfony\Component\DependencyInjection\Loader\Configurator\Traits | vendor/ |
|||||
AutowiringFailedException | class | Symfony\Component\DependencyInjection\Exception | vendor/ |
Thrown when a definition cannot be autowired. | 1 | 2 | ||
AwaitExpression | class | Peast\Syntax\Node | vendor/ |
A node that represents an await expression. | ||||
BackedEnumNormalizer | final class | Symfony\Component\Serializer\Normalizer | vendor/ |
Normalizes a { @author Alexandre Daubois <alex.daubois@gmail.com> | 1 | |||
BackedEnumNormalizerContextBuilder | final class | Symfony\Component\Serializer\Context\Normalizer | vendor/ |
A helper providing autocompletion for available BackedEnumNormalizer options. | ||||
BackedEnumTypeSpacingSniff | class | SlevomatCodingStandard\Sniffs\Classes | vendor/ |
|||||
BackedEnumValueResolver | final class | Symfony\Component\HttpKernel\Controller\ArgumentResolver | vendor/ |
Attempt to resolve backed enum cases from request attributes, for a route path parameter, leading to a 404 Not Found if the attribute value isn't a valid backing value for the enum type. | ||||
BackendChain | class | Drupal\Core\Cache | core/ |
Defines a chained cache implementation for combining multiple cache backends. | 2 | |||
BackendCompilerPass | class | Drupal\Core\DependencyInjection\Compiler | core/ |
Defines a compiler pass to allow automatic override per backend. | 1 | |||
BacktickOperatorSniff | class | PHP_CodeSniffer\Standards\Generic\Sniffs\PHP | vendor/ |
|||||
BackupGlobals | final class | PHPUnit\Metadata | vendor/ |
@psalm-immutable | 1 | |||
BackupGlobals | final class | PHPUnit\Framework\Attributes | vendor/ |
@psalm-immutable | 1 | |||
BackupStaticProperties | final class | PHPUnit\Framework\Attributes | vendor/ |
@psalm-immutable | 1 | |||
BackupStaticProperties | final class | PHPUnit\Metadata | vendor/ |
@psalm-immutable | 1 | |||
BadMethodCallException | class | Symfony\Component\DependencyInjection\Exception | vendor/ |
Base BadMethodCallException for Dependency Injection component. | 1 | 2 | ||
BadMethodCallException | final class | PHPUnit\Framework\MockObject | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 1 | |||
BadMethodCallException | class | Symfony\Component\Validator\Exception | vendor/ |
Base BadMethodCallException for the Validator component. | 1 | |||
BadMethodCallException | class | Symfony\Component\Serializer\Exception | vendor/ |
1 | 3 | |||
BadMethodCallException | class | Symfony\Component\BrowserKit\Exception | vendor/ |
1 | 2 |