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 |
---|---|---|---|---|---|---|---|---|
Array_ | class | PhpParser\Node\Expr\Cast | vendor/ |
|||||
Array_ | class | phpDocumentor\Reflection\Types | vendor/ |
Represents an array type as described in the PSR-5, the PHPDoc Standard. | 3 | 5 | ||
Array_ | class | PhpParser\Node\Expr | vendor/ |
2 | ||||
ArrowFunction | class | PhpParser\Node\Expr | vendor/ |
|||||
ArrowFunctionDeclarationSniff | class | SlevomatCodingStandard\Sniffs\Functions | vendor/ |
|||||
ArrowFunctionExpression | class | Peast\Syntax\Node | vendor/ |
A node that represents an arrow function. For example: var fn = (a, b) => console.log(a, b) | ||||
ArrowFunctionExpression | class | Twig\Node\Expression | vendor/ |
Represents an arrow function. | 1 | |||
ArtifactRepository | class | Composer\Repository | vendor/ |
@author Serge Smertin <serg.smertin@gmail.com> | ||||
AsAlias | final class | Symfony\Component\DependencyInjection\Attribute | vendor/ |
An attribute to tell under which alias a service should be registered or to use the implemented interface if no parameter is given. | 1 | |||
AsciiSlugger | class | Symfony\Component\String\Slugger | vendor/ |
@author Titouan Galopin <galopintitouan@gmail.com> | ||||
AsCommand | class | Symfony\Component\Console\Attribute | vendor/ |
Service tag to autoconfigure commands. | 8 | |||
AsController | class | Symfony\Component\HttpKernel\Attribute | vendor/ |
Autoconfigures controllers as services by applying the `controller.service_arguments` tag to them. | 1 | |||
AsDecorator | class | Symfony\Component\DependencyInjection\Attribute | vendor/ |
Declares a decorating service. | 1 | |||
AsEventListener | class | Symfony\Component\EventDispatcher\Attribute | vendor/ |
Service tag to autoconfigure event listeners. | ||||
AsgardInstaller | class | Composer\Installers | vendor/ |
|||||
Assert | class | Webmozart\Assert | vendor/ |
Efficient assertions to validate the input/output of your methods. | 37 | |||
Assert | abstract class | PHPUnit\Framework | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 1 | 4 | ||
AssertFunctionTypeSpecifyingExtension | class | PHPStan\Type\PHPUnit\Assert | vendor/ |
|||||
AssertingContextualValidator | class | Symfony\Component\Validator\Test | vendor/ |
@internal | ||||
AssertionFailed | final class | PHPUnit\Event\Test | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
AssertionFailedError | class | PHPUnit\Framework | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 6 | 3 | ||
AssertionFailedSubscriber | interface | PHPUnit\Event\Test | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
AssertionSucceeded | final class | PHPUnit\Event\Test | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
AssertionSucceededSubscriber | interface | PHPUnit\Event\Test | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
AssertMailTrait | trait | Drupal\Core\Test | core/ |
Provides methods for testing emails sent during test runs. | ||||
AssertMethodTypeSpecifyingExtension | class | PHPStan\Type\PHPUnit\Assert | vendor/ |
|||||
AssertRuleHelper | class | PHPStan\Rules\PHPUnit | vendor/ |
|||||
AssertSameBooleanExpectedRule | class | PHPStan\Rules\PHPUnit | vendor/ |
@implements Rule<NodeAbstract> | ||||
AssertSameNullExpectedRule | class | PHPStan\Rules\PHPUnit | vendor/ |
@implements Rule<NodeAbstract> | ||||
AssertSameWithCountRule | class | PHPStan\Rules\PHPUnit | vendor/ |
@implements Rule<NodeAbstract> | ||||
AssertStaticMethodTypeSpecifyingExtension | class | PHPStan\Type\PHPUnit\Assert | vendor/ |
|||||
AssertTagMethodValueNode | class | PHPStan\PhpDocParser\Ast\PhpDoc | vendor/ |
1 | ||||
AssertTagPropertyValueNode | class | PHPStan\PhpDocParser\Ast\PhpDoc | vendor/ |
1 | ||||
AssertTagValueNode | class | PHPStan\PhpDocParser\Ast\PhpDoc | vendor/ |
1 | ||||
AssertTypeSpecifyingExtensionHelper | class | PHPStan\Type\PHPUnit\Assert | vendor/ |
|||||
AssetCollectionGrouperInterface | interface | Drupal\Core\Asset | core/ |
Interface defining a service that logically groups a collection of assets. | 2 | 1 | ||
AssetCollectionGroupOptimizerInterface | interface | Drupal\Core\Asset | core/ |
Interface defining a service that optimizes a collection of assets. | 2 | |||
AssetCollectionOptimizerInterface | interface | Drupal\Core\Asset | core/ |
Interface defining a service that optimizes a collection of assets. | 1 | 3 | ||
AssetCollectionRendererInterface | interface | Drupal\Core\Asset | core/ |
Interface defining a service that generates a render array to render assets. | 2 | 3 | ||
AssetControllerBase | abstract class | Drupal\system\Controller | core/ |
Defines a controller to serve asset aggregates. | 2 | |||
AssetDumper | class | Drupal\Core\Asset | core/ |
Dumps a CSS or JavaScript asset. | ||||
AssetDumperInterface | interface | Drupal\Core\Asset | core/ |
Interface defining a service that dumps an (optimized) asset. | 1 | |||
AssetDumperUriInterface | interface | Drupal\Core\Asset | core/ |
Interface defining a service that dumps an asset to a specified location. | 1 | 1 | ||
AssetGroupSetHashTrait | trait | Drupal\Core\Asset | core/ |
Provides a method to generate a normalized hash of a given asset group set. | 3 | |||
AssetOptimizerInterface | interface | Drupal\Core\Asset | core/ |
Interface defining a service that optimizes an asset. | 2 | |||
AssetQueryString | class | Drupal\Core\Asset | core/ |
Stores a cache busting query string service for asset URLs. | ||||
AssetQueryStringInterface | interface | Drupal\Core\Asset | core/ |
Provides a cache busting query string service for asset URLs. | 1 | 1 | ||
AssetResolver | class | Drupal\Core\Asset | core/ |
The default asset resolver. | ||||
AssetResolverInterface | interface | Drupal\Core\Asset | core/ |
Resolves asset libraries into concrete CSS and JavaScript assets. | 1 | 4 | ||
AssetRoutes | class | Drupal\system\Routing | core/ |
Defines a routes' callback to register a URL for serving assets. |