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 |
---|---|---|---|---|---|---|---|---|
AllowedValuesConstraint | class | Drupal\Core\Validation\Plugin\Validation\Constraint | core/ |
Checks for the value being allowed. | 1 | |||
AllowedValuesConstraintValidator | class | Drupal\Core\Validation\Plugin\Validation\Constraint | core/ |
Validates the AllowedValues constraint. | ||||
AllowListConfigStorage | final class | Drupal\Core\Recipe | core/ |
A read-only storage wrapper that only allows access to certain config names. | ||||
AllowToolbarPath | class | Drupal\toolbar\PageCache | core/ |
Cache policy for the toolbar page cache service. | 2 | |||
AllValidator | class | Symfony\Component\Validator\Constraints | vendor/ |
@author Bernhard Schussek <bschussek@gmail.com> | ||||
AlphabeticallySortedByKeysSniff | class | SlevomatCodingStandard\Sniffs\Arrays | vendor/ |
|||||
AlphabeticallySortedUsesSniff | class | SlevomatCodingStandard\Sniffs\Namespaces | vendor/ |
|||||
AlreadyInstalledException | class | Drupal\Core\Installer\Exception | core/ |
Exception thrown if Drupal is installed already. | 1 | |||
AlterableInterface | interface | Drupal\Core\Database\Query | core/ |
Interface for a query that can be manipulated via an alter hook. | 2 | 8 | ||
AlternativePart | final class | Symfony\Component\Mime\Part\Multipart | vendor/ |
@author Fabien Potencier <fabien@symfony.com> | 2 | |||
AlwaysOffSampler | class | OpenTelemetry\SDK\Trace\Sampler | vendor/ |
This implementation of the SamplerInterface always skips record. Example: ``` use OpenTelemetry\Sdk\Trace\AlwaysOffSampler; $sampler = new AlwaysOffSampler(); ``` | 1 | |||
AlwaysOnSampler | class | OpenTelemetry\SDK\Trace\Sampler | vendor/ |
This implementation of the SamplerInterface always records. Example: ``` use OpenTelemetry\Sdk\Trace\AlwaysOnSampler; $sampler = new AlwaysOnSampler(); ``` | 2 | |||
AmbiguousBundleClassException | class | Drupal\Core\Entity\Exception | core/ |
Exception thrown if a bundle class is defined for multiple bundles. | 2 | |||
AmbiguousEntityClassException | class | Drupal\Core\Entity\Exception | core/ |
Exception thrown if multiple entity types exist for an entity class. | 1 | 1 | ||
AmbiguousOptionException | final class | SebastianBergmann\CliParser | vendor/ |
|||||
AmqpCaster | class | Symfony\Component\VarDumper\Caster | vendor/ |
Casts Amqp related classes to array representation. | ||||
Analyze | class | Drupal\views_ui\Form\Ajax | core/ |
Displays analysis information for a view. | ||||
Analyzer | class | Drupal\views | core/ |
View analyzer plugin manager. | 3 | 2 | ||
AnalyzeServiceReferencesPass | class | Symfony\Component\DependencyInjection\Compiler | vendor/ |
Run this pass before passes that need to know more about the relation of your services. | 2 | |||
AndBinary | class | Twig\Node\Expression\Binary | vendor/ |
2 | ||||
AndVersionConstraintGroup | class | PharIo\Version | vendor/ |
|||||
AnnotateCmsInstaller | class | Composer\Installers | vendor/ |
|||||
AnnotatedClassDiscovery | class | Drupal\Component\Annotation\Plugin\Discovery | core/ |
Defines a discovery mechanism to find annotated plugins in PSR-4 namespaces. | 1 | 1 | ||
AnnotatedClassDiscovery | class | Drupal\Core\Plugin\Discovery | core/ |
Defines a discovery mechanism to find annotated plugins in PSR-4 namespaces. | 1 | 2 | ||
AnnotatedClassDiscoveryAutomatedProviders | class | Drupal\migrate\Plugin\Discovery | core/ |
Determines providers based on a class's and its parent's namespaces. | 1 | |||
Annotation | class | Doctrine\Common\Annotations | vendor/ |
Annotations class. | ||||
Annotation | class | Google\Protobuf\Internal\GeneratedCodeInfo | vendor/ |
Generated from protobuf message <code>google.protobuf.GeneratedCodeInfo.Annotation</code> | ||||
Annotation | class | SlevomatCodingStandard\Helpers | vendor/ |
@internal @template T of PhpDocTagValueNode | 7 | |||
AnnotationBase | abstract class | Drupal\Component\Annotation | core/ |
Provides a base class for classed annotations. | 3 | 2 | ||
AnnotationBridgeDecorator | class | Drupal\Component\Annotation\Plugin\Discovery | core/ |
Ensures that all definitions are run through the annotation process. | ||||
AnnotationException | class | Doctrine\Common\Annotations | vendor/ |
Description of AnnotationException | 1 | |||
AnnotationHelper | class | SlevomatCodingStandard\Helpers | vendor/ |
@internal | 19 | |||
AnnotationHelper | class | PHPStan\Rules\PHPUnit | vendor/ |
|||||
AnnotationInterface | interface | Drupal\Component\Annotation | core/ |
Defines a common interface for classed annotations. | 3 | 5 | ||
AnnotationNameSniff | class | SlevomatCodingStandard\Sniffs\Commenting | vendor/ |
|||||
AnnotationParser | final class | PHPUnit\Metadata\Parser | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
AnnotationReader | class | Doctrine\Common\Annotations | vendor/ |
A reader for docblock annotations. | ||||
AnnotationRegistry | final class | Doctrine\Common\Annotations | vendor/ |
4 | ||||
AnnotationsAreNotSupportedForInternalClassesException | final class | PHPUnit\Metadata | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 3 | |||
AnnotationTypeHelper | class | SlevomatCodingStandard\Helpers | vendor/ |
@internal | 5 | |||
AnnounceBlock | class | Drupal\announcements_feed\Plugin\Block | core/ |
Provides an 'Announcements Feed' block. | ||||
AnnounceCommand | class | Drupal\Core\Ajax | core/ |
AJAX command for a JavaScript Drupal.announce() call. | 1 | |||
AnnounceController | class | Drupal\announcements_feed\Controller | core/ |
Controller for community announcements. | ||||
AnnounceFetcher | final class | Drupal\announcements_feed | core/ |
Service to fetch announcements from the external feed. | 2 | |||
Announcement | final class | Drupal\announcements_feed | core/ |
Object containing a single announcement from the feed. | ||||
AnnouncementsFeedHooks | class | Drupal\announcements_feed\Hook | core/ |
Hook implementations for announcements_feed. | ||||
AnnounceRenderer | final class | Drupal\announcements_feed | core/ |
Service to render announcements from the external feed. | 2 | 2 | ||
AnonClassDeclarationSniff | class | PHP_CodeSniffer\Standards\PSR12\Sniffs\Classes | vendor/ |
|||||
AnonymousUserResponseSubscriber | class | Drupal\Core\EventSubscriber | core/ |
Response subscriber to handle finished responses for the anonymous user. | ||||
AnonymousUserSession | class | Drupal\Core\Session | core/ |
An account implementation representing an anonymous user. | 4 |