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 |
|---|---|---|---|---|---|---|---|---|
| DefaultContentSubscriber | class | Drupal\content_moderation\EventSubscriber | core/ |
Subscribes to default content-related events. | ||||
| DefaultContentSubscriber | class | Drupal\layout_builder\EventSubscriber | core/ |
Subscribes to default content-related events. | ||||
| DefaultContentSubscriber | final class | Drupal\menu_link_content\EventSubscriber | core/ |
Subscribes to default content-related events. | 1 | |||
| DefaultContentSubscriber | class | Drupal\link\EventSubscriber | core/ |
Subscribes to default content-related events. | ||||
| DefaultContentSubscriber | class | Drupal\path\EventSubscriber | core/ |
Subscribes to default content-related events. | ||||
| DefaultContentTest | class | Drupal\Tests\menu_link_content\Kernel | core/ |
Tests exporting menu links in YAML format. | ||||
| DefaultDisplay | class | Drupal\views\Plugin\views\display | core/ |
A plugin to handle defaults on a view. | 3 | |||
| DefaultDisplayExtender | class | Drupal\views\Plugin\views\display_extender | core/ |
Default display extender plugin; does nothing. | ||||
| DefaultExceptionHtmlSubscriber | class | Drupal\Core\EventSubscriber | core/ |
Exception subscriber for handling core default HTML error pages. | 1 | 2 | ||
| DefaultExceptionSubscriber | class | Drupal\jsonapi\EventSubscriber | core/ |
Serializes exceptions in compliance with the JSON:API specification. | 2 | |||
| DefaultExceptionSubscriber | class | Drupal\serialization\EventSubscriber | core/ |
Handles default error responses in serialization formats. | 1 | 2 | 2 | |
| DefaultExceptionSubscriberTest | class | Drupal\Tests\serialization\Unit\EventSubscriber | core/ |
Tests Drupal\serialization\EventSubscriber\DefaultExceptionSubscriber. | ||||
| DefaultFactory | class | Drupal\Component\Plugin\Factory | core/ |
Default plugin factory. | 2 | 13 | ||
| DefaultFactoryTest | class | Drupal\Tests\Component\Plugin | core/ |
Tests Drupal\Component\Plugin\Factory\DefaultFactory. | ||||
| DefaultFileFormatter | class | Drupal\file\Plugin\Field\FieldFormatter | core/ |
Formatter for a text field on a file entity that links the field to the file. | ||||
| DefaultFormatTest | class | Drupal\FunctionalTests\Routing | core/ |
Tests Default Format. | ||||
| DefaultFormatTestController | class | Drupal\default_format_test | core/ |
Controller for testing default route format. | ||||
| DefaultHtmlRouteProvider | class | Drupal\Core\Entity\Routing | core/ |
Provides HTML routes for entities. | 3 | 25 | ||
| DefaultHtmlRouteProviderTest | class | Drupal\Tests\Core\Entity\Routing | core/ |
Tests Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider. | ||||
| DefaultLangcode | class | Drupal\language\Plugin\migrate\destination | core/ |
Provides a destination plugin for the default langcode config. | ||||
| DefaultLanguageItem | class | Drupal\language | core/ |
Alternative plugin implementation of the 'language' field type. | ||||
| DefaultLanguageRenderer | class | Drupal\views\Entity\Render | core/ |
Renders entities in their default language. | ||||
| DefaultLazyPluginCollection | class | Drupal\Core\Plugin | core/ |
Provides a default plugin collection for a plugin type. | 5 | 8 | ||
| DefaultLazyPluginCollectionTest | class | Drupal\Tests\Core\Plugin | core/ |
Tests Drupal\Core\Plugin\DefaultLazyPluginCollection. | ||||
| DefaultMenuLinkTreeManipulators | class | Drupal\Core\Menu | core/ |
Provides a couple of menu link tree manipulators. | 1 | 2 | ||
| DefaultMenuLinkTreeManipulatorsTest | class | Drupal\Tests\Core\Menu | core/ |
Tests the default menu link tree manipulators. | ||||
| DefaultMetatagsTest | class | Drupal\Tests\system\Functional\Page | core/ |
Tests default HTML metatags on a page. | ||||
| DefaultMetatagsTest | class | Drupal\Tests\system\Kernel\Page | core/ |
Tests default HTML metatags on a page. | ||||
| DefaultMobileMetaTagsTest | class | Drupal\Tests\system\Kernel\System | core/ |
Confirm that the default mobile meta tags appear as expected. | ||||
| DefaultMobileMetaTagsTest | class | Drupal\Tests\system\Functional\System | core/ |
Confirm that the default mobile meta tags appear as expected. | ||||
| DefaultModerationStateTest | class | Drupal\Tests\content_moderation\Functional | core/ |
Tests setting a custom default moderation state. | ||||
| DefaultNegotiator | class | Drupal\Core\Theme | core/ |
Determines the default theme of the site. | 2 | |||
| DefaultPasswordGenerator | class | Drupal\Core\Password | core/ |
Provides a default password generator. | 1 | 2 | ||
| DefaultPasswordGeneratorTest | class | Drupal\Tests\Core\Password | core/ |
Unit tests for password generator. | ||||
| DefaultPluginManager | class | Drupal\Core\Plugin | core/ |
Base class for plugin managers. | 51 | 53 | ||
| DefaultPluginManagerTest | class | Drupal\Tests\Core\Plugin | core/ |
Tests the DefaultPluginManager. | ||||
| DefaultPluginManagerTest | class | Drupal\KernelTests\Core\Plugin | core/ |
Tests the default plugin manager. | ||||
| DefaultRequestPolicy | class | Drupal\Core\PageCache | core/ |
The default page cache request policy. | 1 | 1 | 2 | |
| DefaultRequestPolicy | class | Drupal\dynamic_page_cache\PageCache\RequestPolicy | core/ |
The default Dynamic Page Cache request policy. | 1 | 1 | 2 | |
| DefaultRevisionStateTest | class | Drupal\Tests\content_moderation\Kernel | core/ |
Tests the correct default revision is set. | ||||
| DefaultSelection | class | Drupal\Core\Entity\Plugin\EntityReferenceSelection | core/ |
Default plugin implementation of the Entity Reference Selection plugin. | 11 | 10 | ||
| DefaultSelectionDeriver | class | Drupal\Core\Entity\Plugin\Derivative | core/ |
Provides derivative plugins for the DefaultSelection plugin. | 1 | |||
| DefaultsEntityForm | class | Drupal\layout_builder\Form | core/ |
Provides a form containing the Layout Builder UI for defaults. | 1 | |||
| DefaultSingleLazyPluginCollection | class | Drupal\Core\Plugin | core/ |
Provides a default plugin collection for a plugin type. | 3 | 7 | ||
| DefaultSingleLazyPluginCollectionTest | class | Drupal\Tests\Core\Plugin | core/ |
Tests Drupal\Core\Plugin\DefaultSingleLazyPluginCollection. | ||||
| DefaultsSectionStorage | class | Drupal\layout_builder\Plugin\SectionStorage | core/ |
Defines the 'defaults' section storage type. | 3 | |||
| DefaultsSectionStorageInterface | interface | Drupal\layout_builder | core/ |
Defines an interface for an object that stores layout sections for defaults. | 1 | 5 | ||
| DefaultsSectionStorageTest | class | Drupal\Tests\layout_builder\Unit | core/ |
Tests Drupal\layout_builder\Plugin\SectionStorage\DefaultsSectionStorage. | ||||
| DefaultsSectionStorageTest | class | Drupal\Tests\layout_builder\Kernel | core/ |
Tests Drupal\layout_builder\Plugin\SectionStorage\DefaultsSectionStorage. | ||||
| DefaultsTestPluginManager | class | Drupal\plugin_test\Plugin | core/ |
Defines a plugin manager used by Plugin API unit tests. | 1 |
Pagination
- Previous page
- Page 50
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.