Classes, traits, and interfaces - 9.5.x - drupal
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 1523
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| OEmbedInterface | interface | Drupal\media\Plugin\media\Source | core/ |
Defines additional functionality for source plugins that use oEmbed. | 1 | 6 | ||
| OEmbedResourceConstraint | class | Drupal\media\Plugin\Validation\Constraint | core/ |
Checks if a value represents a valid oEmbed resource URL. | 1 | |||
| OEmbedResourceConstraintValidator | class | Drupal\media\Plugin\Validation\Constraint | core/ |
Validates oEmbed resource URLs. | 1 | |||
| OEmbedResourceConstraintValidatorTest | class | Drupal\Tests\media\Kernel | core/ |
@coversDefaultClass \Drupal\media\Plugin\Validation\Constraint\OEmbedResourceConstraintValidator[[api-linebreak]] | ||||
| OEmbedSourceTest | class | Drupal\Tests\media\Kernel | core/ |
@coversDefaultClass \Drupal\media\Plugin\media\Source\OEmbed[[api-linebreak]] | ||||
| OEmbedTestTrait | trait | Drupal\Tests\media\Traits | core/ |
Contains helper functions for testing oEmbed functionality in isolation. | 6 | |||
| OEmbedWidget | class | Drupal\media\Plugin\Field\FieldWidget | core/ |
Plugin implementation of the 'oembed_textfield' widget. | ||||
| OffCanvasDialogTest | class | Drupal\Tests\system\Functional\Ajax | core/ |
Performs tests on opening and manipulating dialogs via AJAX commands. | ||||
| OffCanvasRenderer | class | Drupal\Core\Render\MainContent | core/ |
Default main content renderer for off-canvas dialog requests. | 3 | |||
| OffCanvasTest | class | Drupal\Tests\system\FunctionalJavascript | core/ |
Tests the off-canvas dialog functionality. | ||||
| OffCanvasTestBase | abstract class | Drupal\Tests\system\FunctionalJavascript | core/ |
Base class contains common test functionality for the Off-canvas dialog. | 3 | 2 | ||
| OffCanvasTestTrait | trait | Drupal\Tests\system\Traits | core/ |
Provides helper methods for interacting with the off-canvas area. | 5 | |||
| OffsetPage | class | Drupal\jsonapi\Query | core/ |
Value object for containing the requested offset and page parameters. | 3 | |||
| OffsetPageTest | class | Drupal\Tests\jsonapi\Unit\Query | core/ |
@coversDefaultClass \Drupal\jsonapi\Query\OffsetPage[[api-linebreak]] @group jsonapi | ||||
| OliveroMessagesTest | class | Drupal\FunctionalJavascriptTests\Theme | core/ |
Runs OliveroMessagesTest in Olivero. | ||||
| OliveroPreRender | class | Drupal\olivero | core/ |
Implements trusted prerender callbacks for the Olivero theme. | 1 | |||
| OliveroTest | class | Drupal\FunctionalTests\Theme | core/ |
Tests the Olivero theme. | ||||
| OmittedData | class | Drupal\jsonapi\JsonApiResource | core/ |
Represents resource data that should be omitted from the JSON:API document. | 1 | |||
| OpCodeCache | class | Drupal\Component\Utility | core/ |
Provides helpers to handle PHP opcode caches. | 3 | |||
| OpenDialogCommand | class | Drupal\Core\Ajax | core/ |
Defines an AJAX command to open certain content in a dialog. | 2 | 3 | ||
| OpenerResolver | class | Drupal\media_library | core/ |
Defines a class to get media library openers from the container. | 2 | |||
| OpenerResolverInterface | interface | Drupal\media_library | core/ |
Defines an interface to get a media library opener from the container. | 1 | 3 | ||
| OpenModalDialogCommand | class | Drupal\Core\Ajax | core/ |
Defines an AJAX command to open certain content in a dialog in a modal dialog. | 5 | |||
| OpenOffCanvasDialogCommand | class | Drupal\Core\Ajax | core/ |
Defines an AJAX command to open content in a dialog in an off-canvas tray. | 2 | |||
| OpenOffCanvasDialogCommandTest | class | Drupal\Tests\Core\Ajax | core/ |
@coversDefaultClass \Drupal\Core\Ajax\OpenOffCanvasDialogCommand[[api-linebreak]] @group Ajax | ||||
| OperationBase | abstract class | Drupal\image_test\Plugin\ImageToolkit\Operation\test | core/ |
Provides a base class for test operations. | 3 | |||
| OperationData | class | Drupal\Composer\Plugin\Scaffold\Operations | composer/ |
Holds parameter data for operation objects during operation creation only. | 1 | |||
| OperationFactory | class | Drupal\Composer\Plugin\Scaffold\Operations | composer/ |
Create Scaffold operation objects based on provided metadata. | 1 | |||
| OperationInterface | interface | Drupal\Composer\Plugin\Scaffold\Operations | composer/ |
Interface for scaffold operation objects. | 1 | 1 | ||
| Operations | class | Drupal\Core\Render\Element | core/ |
Provides a render element for a set of operations links. | ||||
| Opml | class | Drupal\views\Plugin\views\style | core/ |
Default style plugin to render an OPML feed. | ||||
| OpmlFeedAdd | class | Drupal\aggregator\Form | core/ |
Imports feeds from OPML. | 1 | |||
| OpmlFields | class | Drupal\views\Plugin\views\row | core/ |
Renders an OPML item based on fields. | ||||
| OptGroup | class | Drupal\Core\Form | core/ |
Provides helpers for HTML option groups. | 6 | |||
| OptGroupTest | class | Drupal\Tests\Core\Form | core/ |
@coversDefaultClass \Drupal\Core\Form\OptGroup[[api-linebreak]] @group Form | ||||
| OptimizedPhpArrayDumper | class | Drupal\Component\DependencyInjection\Dumper | core/ |
OptimizedPhpArrayDumper dumps a service container as a serialized PHP array. | 1 | |||
| OptimizedPhpArrayDumperTest | class | Drupal\Tests\Component\DependencyInjection\Dumper | core/ |
@coversDefaultClass \Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper[[api-linebreak]] @group DependencyInjection | 1 | |||
| OptionalContextCondition | class | Drupal\condition_test\Plugin\Condition | core/ |
Provides a condition with an optional node context. | ||||
| OptionalContextConditionTest | class | Drupal\KernelTests\Core\Plugin\Condition | core/ |
Tests a condition with optional context. | ||||
| OptionsButtonsWidget | class | Drupal\Core\Field\Plugin\Field\FieldWidget | core/ |
Plugin implementation of the 'options_buttons' widget. | ||||
| OptionsDefaultFormatter | class | Drupal\options\Plugin\Field\FieldFormatter | core/ |
Plugin implementation of the 'list_default' formatter. | ||||
| OptionsDynamicValuesApiTest | class | Drupal\Tests\options\Functional | core/ |
Tests the options allowed values api. | ||||
| OptionsDynamicValuesTestBase | abstract class | Drupal\Tests\options\Functional | core/ |
Base class for testing allowed values of options fields. | 3 | |||
| OptionsDynamicValuesValidationTest | class | Drupal\Tests\options\Functional | core/ |
Tests the Options field allowed values function. | ||||
| OptionsField | class | Drupal\options\Plugin\migrate\field\d7 | core/ |
Plugin annotation @MigrateField( id = "options", core = {7}, source_module = "options", destination_module = "options" ) | ||||
| OptionsFieldTest | class | Drupal\Tests\options\Kernel | core/ |
Tests for the 'Options' field types. | ||||
| OptionsFieldUITest | class | Drupal\Tests\options\Functional | core/ |
Tests the Options field UI functionality. | ||||
| OptionsFieldUnitTestBase | abstract class | Drupal\Tests\options\Kernel | core/ |
Base class for Options module integration tests. | 2 | |||
| OptionsFloatFieldImportTest | class | Drupal\Tests\options\Functional | core/ |
Tests option fields can be updated and created through config synchronization. | ||||
| OptionsFormattersTest | class | Drupal\Tests\options\Kernel | core/ |
Tests the Options field type formatters. |
Pagination
- Previous page
- Page 125
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.