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 |
---|---|---|---|---|---|---|---|---|
ObservableCallbackInterface | interface | OpenTelemetry\API\Metrics | vendor/ |
An observed callback. | 2 | 9 | ||
ObservableCounter | final class | OpenTelemetry\SDK\Metrics | vendor/ |
@internal | ||||
ObservableCounterInterface | interface | OpenTelemetry\API\Metrics | vendor/ |
2 | 4 | |||
ObservableGauge | final class | OpenTelemetry\SDK\Metrics | vendor/ |
@internal | ||||
ObservableGaugeInterface | interface | OpenTelemetry\API\Metrics | vendor/ |
2 | 4 | |||
ObservableInstrumentTrait | trait | OpenTelemetry\SDK\Metrics | vendor/ |
@internal | ||||
ObservableUpDownCounter | final class | OpenTelemetry\SDK\Metrics | vendor/ |
@internal | ||||
ObservableUpDownCounterInterface | interface | OpenTelemetry\API\Metrics | vendor/ |
2 | 4 | |||
ObserverInterface | interface | OpenTelemetry\API\Metrics | vendor/ |
2 | 5 | |||
ObsoleteCommand | final class | WebDriver\Exception | vendor/ |
WebDriver\Exception\ObsoleteCommand class | ||||
ObsoleteDTEXT | class | Egulias\EmailValidator\Warning | vendor/ |
1 | ||||
ObsoleteExtensionException | class | Drupal\Core\Extension\Exception | core/ |
Exception thrown when the extension is obsolete on install. | 1 | |||
OctoberInstaller | class | Composer\Installers | vendor/ |
|||||
OddTest | class | Twig\Node\Expression\Test | vendor/ |
Checks if a number is odd. | 1 | |||
OEmbed | class | Drupal\media\Plugin\media\Source | core/ |
Provides a media source plugin for oEmbed resources. | ||||
OEmbedDeriver | class | Drupal\media\Plugin\media\Source | core/ |
Derives media source plugin definitions for supported oEmbed providers. | ||||
OEmbedForm | class | Drupal\media_library\Form | core/ |
Creates a form to create media entities from oEmbed URLs. | 1 | |||
OEmbedFormatter | class | Drupal\media\Plugin\Field\FieldFormatter | core/ |
Plugin implementation of the 'oembed' formatter. | ||||
OEmbedIframeController | class | Drupal\media\Controller | core/ |
Controller which renders an oEmbed resource in a bare page (without blocks). | ||||
OEmbedInterface | interface | Drupal\media\Plugin\media\Source | core/ |
Defines additional functionality for source plugins that use oEmbed. | 1 | 5 | ||
OEmbedMediaSource | class | Drupal\media\Attribute | core/ |
Defines a OEmbedMediaSource attribute. | 1 | |||
OEmbedResourceConstraint | class | Drupal\media\Plugin\Validation\Constraint | core/ |
Checks if a value represents a valid oEmbed resource URL. | ||||
OEmbedResourceConstraintValidator | class | Drupal\media\Plugin\Validation\Constraint | core/ |
Validates oEmbed resource URLs. | ||||
OEmbedWidget | class | Drupal\media\Plugin\Field\FieldWidget | core/ |
Plugin implementation of the 'oembed_textfield' widget. | ||||
OffCanvasRenderer | class | Drupal\Core\Render\MainContent | core/ |
Default main content renderer for off-canvas dialog requests. | ||||
OffsetAccessTypeNode | class | PHPStan\PhpDocParser\Ast\Type | vendor/ |
3 | ||||
OffsetPage | class | Drupal\jsonapi\Query | core/ |
Value object for containing the requested offset and page parameters. | 1 | |||
OliveroPreRender | class | Drupal\olivero | core/ |
Implements trusted prerender callbacks for the Olivero theme. | 1 | |||
OmittedData | class | Drupal\jsonapi\JsonApiResource | core/ |
Represents resource data that should be omitted from the JSON:API document. | 1 | |||
OneClassPerFileSniff | class | PHP_CodeSniffer\Standards\Generic\Sniffs\Files | vendor/ |
|||||
OneInterfacePerFileSniff | class | PHP_CodeSniffer\Standards\Generic\Sniffs\Files | vendor/ |
|||||
OneObjectStructurePerFileSniff | class | PHP_CodeSniffer\Standards\Generic\Sniffs\Files | vendor/ |
|||||
OneofDescriptor | class | Google\Protobuf\Internal | vendor/ |
|||||
OneofDescriptor | class | Google\Protobuf | vendor/ |
|||||
OneofDescriptorProto | class | Google\Protobuf\Internal | vendor/ |
Describes a oneof. | ||||
OneofField | class | Google\Protobuf\Internal | vendor/ |
|||||
OneofOptions | class | Google\Protobuf\Internal | vendor/ |
Generated from protobuf message <code>google.protobuf.OneofOptions</code> | ||||
OneTraitPerFileSniff | class | PHP_CodeSniffer\Standards\Generic\Sniffs\Files | vendor/ |
|||||
OntoWikiInstaller | class | Composer\Installers | vendor/ |
|||||
OpacitySniff | class | PHP_CodeSniffer\Standards\Squiz\Sniffs\CSS | vendor/ |
|||||
OpCodeCache | class | Drupal\Component\Utility | core/ |
Provides helpers to handle PHP opcode caches. | 3 | |||
OpenBracketSpacingSniff | class | Drupal\Sniffs\WhiteSpace | vendor/ |
Checks that there is no white space after an opening bracket, for "(" and "{". Square Brackets are handled by \PHP_CodeSniffer\Standards\Squiz\Sniffs\Arrays\ArrayBracketSpacingSniff. | ||||
OpenDialogCommand | class | Drupal\Core\Ajax | core/ |
Defines an AJAX command to open certain content in a dialog. | 2 | 1 | ||
OpenerResolver | class | Drupal\media_library | core/ |
Defines a class to resolve media library openers. | 2 | |||
OpenerResolverInterface | interface | Drupal\media_library | core/ |
Defines an interface to get a media library opener from the container. | 1 | 3 | ||
OpeningBraceSameLineSniff | class | PHP_CodeSniffer\Standards\Generic\Sniffs\Classes | vendor/ |
|||||
OpeningBraceSpaceSniff | class | PHP_CodeSniffer\Standards\PSR12\Sniffs\Classes | vendor/ |
|||||
OpeningFunctionBraceBsdAllmanSniff | class | PHP_CodeSniffer\Standards\Generic\Sniffs\Functions | vendor/ |
1 | ||||
OpeningFunctionBraceKernighanRitchieSniff | class | PHP_CodeSniffer\Standards\Generic\Sniffs\Functions | vendor/ |
2 | ||||
OpenModalDialogCommand | class | Drupal\Core\Ajax | core/ |
Defines an AJAX command to open certain content in a dialog in a modal dialog. | 3 |