Classes, traits, and interfaces - main - 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 1529
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| OptGroup | class | Drupal\Core\Form | core/ |
Provides helpers for HTML option groups. | 6 | |||
| OptGroupTest | class | Drupal\Tests\Core\Form | core/ |
Tests Drupal\Core\Form\OptGroup. | ||||
| OptimizedPhpArrayDumper | class | Drupal\Component\DependencyInjection\Dumper | core/ |
OptimizedPhpArrayDumper dumps a service container as a serialized PHP array. | 1 | 1 | ||
| OptimizedPhpArrayDumperTest | class | Drupal\Tests\Component\DependencyInjection\Dumper | core/ |
Tests Drupal\Component\DependencyInjection\Dumper\OptimizedPhpArrayDumper. | 1 | |||
| OptionalConstraint | class | Drupal\Core\Validation\Plugin\Validation\Constraint | core/ |
Marks a field as optional in a Collection constraint. | ||||
| 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. | ||||
| OptionalServiceSystemTestController | class | Drupal\system_test\Controller | core/ |
A controller that specifies an optional dependency. | 1 | |||
| OptionsAllowedValues | class | Drupal\options_test | core/ |
Provide allowed values callback. | ||||
| 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\Kernel | core/ |
Tests the options allowed values api. | ||||
| OptionsDynamicValuesTestBase | abstract class | Drupal\Tests\options\Functional | core/ |
Base class for testing allowed values of options fields. | 1 | |||
| OptionsDynamicValuesValidationTest | class | Drupal\Tests\options\Kernel | core/ |
Tests the Options field allowed values function. | ||||
| OptionsEnumTrait | trait | Drupal\Core\Utility | core/ |
Helper functions to translate enum cases into an array of options. | 5 | |||
| OptionsField | class | Drupal\options\Plugin\migrate\field\d7 | core/ |
Migrate field plugin for Drupal 7 options fields. | ||||
| OptionsFieldTest | class | Drupal\Tests\options\Kernel | core/ |
Tests for the 'Options' field types. | ||||
| OptionsFieldUIAllowedValuesTest | class | Drupal\Tests\options\FunctionalJavascript | core/ |
Tests the Options field allowed values UI functionality. | ||||
| OptionsFieldUITest | class | Drupal\Tests\options\FunctionalJavascript | core/ |
Tests the Options field UI functionality. | ||||
| 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. | 5 | |||
| OptionsFloatFieldImportTest | class | Drupal\Tests\options\Functional | core/ |
Tests option fields can be updated and created by config synchronization. | ||||
| OptionsFormattersTest | class | Drupal\Tests\options\Kernel | core/ |
Tests the Options field type formatters. | ||||
| OptionsHooks | class | Drupal\options\Hook | core/ |
Hook implementations for options. | ||||
| OptionsKeyFormatter | class | Drupal\options\Plugin\Field\FieldFormatter | core/ |
Plugin implementation of the 'list_key' formatter. | ||||
| OptionsListArgumentTest | class | Drupal\Tests\options\Kernel\Views | core/ |
Tests options list argument for views. | ||||
| OptionsListFilterTest | class | Drupal\Tests\options\Kernel\Views | core/ |
Tests options list filter for views. | ||||
| OptionsProviderInterface | interface | Drupal\Core\TypedData | core/ |
Interface for retrieving all possible and settable values. | 5 | 9 | ||
| OptionsRequestSubscriber | class | Drupal\Core\EventSubscriber | core/ |
Handles options requests. | 1 | 2 | ||
| OptionsRequestSubscriberTest | class | Drupal\Tests\Core\EventSubscriber | core/ |
Tests Drupal\Core\EventSubscriber\OptionsRequestSubscriber. | ||||
| OptionsSelectDynamicValuesTest | class | Drupal\Tests\options\Functional | core/ |
Tests an options select with a dynamic allowed values function. | ||||
| OptionsSelectNoMultipleWidget | class | Drupal\options_test\Plugin\Field\FieldWidget | core/ |
Widget extending OptionsSelectWidget without declaring multiple_values. | ||||
| OptionsSelectWidget | class | Drupal\Core\Field\Plugin\Field\FieldWidget | core/ |
Plugin implementation of the 'options_select' widget. | 2 | 2 | ||
| OptionsTestBase | abstract class | Drupal\Tests\options\Kernel\Views | core/ |
Base class for options views tests. | 3 | |||
| OptionsTestHooks | class | Drupal\options_test\Hook | core/ |
Hook implementations for options_test. | ||||
| OptionsViewsHooks | class | Drupal\options\Hook | core/ |
Hook implementations for options. | ||||
| OptionsWidgetBase | abstract class | Drupal\Core\Field\Plugin\Field\FieldWidget | core/ |
Base class for the 'options_*' widgets. | 2 | 1 | ||
| OptionsWidgetBaseTest | class | Drupal\Tests\options\Kernel | core/ |
Tests OptionsWidgetBase. | ||||
| OptionsWidgetsTest | class | Drupal\Tests\options\Functional | core/ |
Tests the Options widgets. | ||||
| OptionWidgetsField | class | Drupal\options\Plugin\migrate\field\d6 | core/ |
MigrateField Plugin for Drupal 6 options fields. | ||||
| Orange | class | Drupal\plugin_test\Plugin\plugin_test\fruit | core/ |
Plugin annotation @Plugin( id = "orange", label = "Orange", color = "orange" ) | ||||
| OrderAfter | class | Drupal\Core\Hook\Order | core/ |
Set this implementation to be after others. | 9 | |||
| OrderBefore | class | Drupal\Core\Hook\Order | core/ |
Set this implementation to be before others. | 3 | |||
| OrderByTest | class | Drupal\Tests\Core\Database | core/ |
Tests the orderBy() method of select queries. | ||||
| OrderInterface | interface | Drupal\Core\Hook\Order | core/ |
Interface for order specifiers used in hook attributes. | 1 | 2 | ||
| OrderOperation | abstract class | Drupal\Core\Hook\OrderOperation | core/ |
Base class for order operations. | 2 | 5 | ||
| OriginatorSubscriber | class | Drupal\Core\Mailer\EventSubscriber | core/ |
Message subscriber which sets the from and sender headers. | 1 | |||
| OriginatorSubscriberTest | class | Drupal\Tests\mailer\Kernel | core/ |
Tests default originator subscriber. | ||||
| OtherModuleInstalledHooks | class | Drupal\respond_install_uninstall_hook_test\Hook | core/ |
Hook implementations for respond_install_uninstall_hook_test. | ||||
| OtherModuleUninstalledHooks | class | Drupal\respond_install_uninstall_hook_test\Hook | core/ |
Hook implementations for respond_install_uninstall_hook_test. |
Pagination
- Previous page
- Page 149
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.