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 |
---|---|---|---|---|---|---|---|---|
AssetsStream | class | Drupal\Core\StreamWrapper | core/ |
Defines a Drupal stream wrapper class for optimized assets (assets://). | 1 | |||
Assign | class | PhpParser\Node\Expr | vendor/ |
|||||
AssignContextVariable | final class | Twig\Node\Expression\Variable | vendor/ |
4 | ||||
AssignmentExpression | class | Peast\Syntax\Node | vendor/ |
A node that represents an assignment expression. For example: a = b | ||||
AssignmentInConditionSniff | class | PHP_CodeSniffer\Standards\Generic\Sniffs\CodeAnalysis | vendor/ |
|||||
AssignmentInConditionSniff | class | SlevomatCodingStandard\Sniffs\ControlStructures | vendor/ |
|||||
AssignmentPattern | class | Peast\Syntax\Node | vendor/ |
A node that represents an assignment in a binding context. For example "a = b" in: var {a = b} = c | ||||
AssignmentProperty | class | Peast\Syntax\Node | vendor/ |
A node that represents a property in an object binding pattern. For example "a" in: var {a} = b | ||||
AssignNameExpression | class | Twig\Node\Expression | vendor/ |
1 | 3 | |||
AssignOp | abstract class | PhpParser\Node\Expr | vendor/ |
13 | 15 | |||
AssignRef | class | PhpParser\Node\Expr | vendor/ |
|||||
AssignTemplateVariable | final class | Twig\Node\Expression\Variable | vendor/ |
4 | ||||
AssignThisSniff | class | PHP_CodeSniffer\Standards\MySource\Sniffs\Objects | vendor/ |
|||||
AssociativeArrayMap | class | Ramsey\Collection\Map | vendor/ |
`AssociativeArrayMap` represents a standard associative array object. | ||||
AsTaggedItem | class | Symfony\Component\DependencyInjection\Attribute | vendor/ |
An attribute to tell under which index and priority a service class should be found in tagged iterators/locators. | 1 | |||
AsTargetedValueResolver | class | Symfony\Component\HttpKernel\Attribute | vendor/ |
Service tag to autoconfigure targeted value resolvers. | ||||
AsymmetricVisibilityTokenEmulator | final class | PhpParser\Lexer\TokenEmulator | vendor/ |
1 | ||||
AsynchronousInstrument | interface | OpenTelemetry\API\Metrics | vendor/ |
Marker interface for asynchronous instruments. | 3 | 2 | ||
AsynchronousInstruments | final class | OpenTelemetry\SDK\Metrics | vendor/ |
@internal | ||||
AsynchronousMetricStream | final class | OpenTelemetry\SDK\Metrics\Stream | vendor/ |
@internal | 1 | |||
AtextAfterCFWS | class | Egulias\EmailValidator\Result\Reason | vendor/ |
1 | ||||
AtLeastOneOf | class | Symfony\Component\Validator\Constraints | vendor/ |
Checks that at least one of the given constraint is satisfied. | 1 | |||
AtLeastOneOfValidator | class | Symfony\Component\Validator\Constraints | vendor/ |
@author Przemysław Bogusz <przemyslaw.bogusz@tubotax.pl> | ||||
AtLeastVersionCommand | final class | PHPUnit\TextUI\Command | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 1 | |||
AttachedAssets | class | Drupal\Core\Asset | core/ |
The default attached assets collection. | 8 | |||
AttachedAssetsInterface | interface | Drupal\Core\Asset | core/ |
The attached assets collection for the current response. | 1 | 10 | ||
Attachment | class | Drupal\views\Plugin\views\display | core/ |
The plugin that handles an attachment display. | ||||
AttachmentsInterface | interface | Drupal\Core\Render | core/ |
The attached metadata collection for a renderable element. | 3 | 6 | ||
AttachmentsResponseProcessorInterface | interface | Drupal\Core\Render | core/ |
Defines an interface for processing attachments of responses that have them. | 2 | 3 | ||
AttachmentsTrait | trait | Drupal\Core\Render | core/ |
Provides an implementation of AttachmentsInterface. | 1 | |||
AttogramInstaller | class | Composer\Installers | vendor/ |
|||||
Attribute | final class | Doctrine\Common\Annotations\Annotation | vendor/ |
Annotation that can be used to signal to the parser to check the attribute type during the parsing process. | 2 | |||
Attribute | class | SlevomatCodingStandard\Helpers | vendor/ |
@internal | ||||
Attribute | class | Peast\Selector\Node\Part | vendor/ |
Selector part attribute class | ||||
Attribute | final class | PHPStan\PhpDocParser\Ast | vendor/ |
4 | ||||
Attribute | class | Drupal\Core\Template | core/ |
Collects, sanitizes, and renders HTML attributes. | 25 | 10 | ||
Attribute | class | PhpParser\Node | vendor/ |
2 | ||||
AttributeAndTargetSpacingSniff | class | SlevomatCodingStandard\Sniffs\Attributes | vendor/ |
|||||
AttributeArray | class | Drupal\Core\Template | core/ |
A class that defines a type of Attribute that can be added to as an array. | ||||
AttributeAutoconfigurationPass | final class | Symfony\Component\DependencyInjection\Compiler | vendor/ |
@author Alexander M. Turek <me@derrabus.de> | ||||
AttributeBag | class | Symfony\Component\HttpFoundation\Session\Attribute | vendor/ |
This class relates to session attribute storage. | 1 | |||
AttributeBagInterface | interface | Symfony\Component\HttpFoundation\Session\Attribute | vendor/ |
Attributes store. | 1 | 1 | ||
AttributeBase | abstract class | Drupal\Component\Plugin\Attribute | core/ |
Provides a base class for classed attributes. | 3 | 1 | ||
AttributeBoolean | class | Drupal\Core\Template | core/ |
A class that defines a type of boolean HTML attribute. | ||||
AttributeBridgeDecorator | class | Drupal\Component\Plugin\Discovery | core/ |
Ensures that all definitions are run through the attribute process. | 2 | |||
AttributeClassDiscovery | class | Drupal\Component\Plugin\Discovery | core/ |
Defines a discovery mechanism to find plugins with attributes. | 1 | 1 | ||
AttributeClassDiscovery | class | Drupal\Core\Plugin\Discovery | core/ |
Defines a discovery mechanism to find plugins using attributes. | 1 | 1 | ||
AttributeClassLoader | abstract class | Symfony\Component\Routing\Loader | vendor/ |
AttributeClassLoader loads routing information from a PHP class and its methods. | ||||
AttributeDirectoryLoader | class | Symfony\Component\Routing\Loader | vendor/ |
AttributeDirectoryLoader loads routing information from attributes set on PHP classes and methods. | ||||
AttributeDiscoveryWithAnnotations | class | Drupal\Core\Plugin\Discovery | core/ |
Enables both attribute and annotation discovery for plugin definitions. | 4 |