Classes, traits, and interfaces in Drupal 9
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
|
Name |
Type | Namespace | Location | Description | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|
| VocabularySerializationTest | class |
Drupal\ |
core/ |
Regression test for https://www.drupal.org/node/2807263. | |||
| VocabularySerializationTestController | class |
Drupal\ |
core/ |
||||
| VocabularyStorage | class |
Drupal\ |
core/ |
Defines a storage handler class for taxonomy vocabularies. | |||
| VocabularyStorageInterface | interface |
Drupal\ |
core/ |
Defines an interface for vocabulary entity storage classes. | 1 | 6 | |
| VocabularyTest | class |
Drupal\ |
core/ |
JSON:API integration test for the "vocabulary" config entity type. | |||
| VocabularyTest | class |
Drupal\ |
core/ |
Tests D6 vocabulary source plugin. | |||
| VocabularyTest | class |
Drupal\ |
core/ |
Tests D7 vocabulary source plugin. | 1 | 1 | |
| VocabularyTranslation | class |
Drupal\ |
core/ |
Drupal 6 i18n vocabulary translations from source database. | |||
| VocabularyTranslation | class |
Drupal\ |
core/ |
Drupal 7 i18n vocabulary translations source from database. | |||
| VocabularyTranslationTest | class |
Drupal\ |
core/ |
Tests content translation for vocabularies. | |||
| VocabularyTranslationTest | class |
Drupal\ |
core/ |
Tests D6 i18n vocabulary source plugin. | |||
| VocabularyTranslationTest | class |
Drupal\ |
core/ |
Tests D7 i18n vocabulary source plugin. | |||
| VocabularyUiTest | class |
Drupal\ |
core/ |
Tests the taxonomy vocabulary interface. | |||
| VocabularyVid | class |
Drupal\ |
core/ |
Argument handler to accept a vocabulary id. | |||
| VocabularyXmlAnonTest | class |
Drupal\ |
core/ |
@group rest | |||
| VocabularyXmlBasicAuthTest | class |
Drupal\ |
core/ |
@group rest | |||
| VocabularyXmlCookieTest | class |
Drupal\ |
core/ |
@group rest | |||
| Watchdog | class |
Drupal\ |
core/ |
Defines a wizard for the watchdog table. | |||
| WebAssert | class |
Drupal\ |
core/ |
Defines a class with methods for asserting presence of elements during tests. | 1 | 4 | |
| WebAssertArgumentsTest | class |
Drupal\ |
core/ |
Tests that calling WebAssert methods with extra arguments leads to errors. | |||
| WebAssertTest | class |
Drupal\ |
core/ |
Tests WebAssert functionality. | |||
| WebDriverCurlService | class |
Drupal\ |
core/ |
Provides a curl service to interact with Selenium driver. | |||
| WebDriverTestBase | abstract class |
Drupal\ |
core/ |
Runs a browser test using a driver that supports JavaScript. | 131 | 126 | |
| WebDriverWebAssert | class |
Drupal\ |
core/ |
Defines a JSWebAssert with no support for status code and header assertions. | |||
| WeekDate | class |
Drupal\ |
core/ |
Argument handler for a week. | |||
| WeekDate | class |
Drupal\ |
core/ |
Argument handler for a week. | |||
| Weight | class |
Drupal\ |
core/ |
Provides a form element for input of a weight. | 1 | ||
| WeightTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\Core\Render\Element\Weight @group Render | |||
| WhosOnlineBlockTest | class |
Drupal\ |
core/ |
Tests the Who's Online Block. | |||
| WideModalRenderer | class |
Drupal\ |
core/ |
Default main content renderer for wide modal dialog requests. | 3 | ||
| WidgetAccessTest | class |
Drupal\ |
core/ |
Tests the media library UI access. | |||
| WidgetAnonymousTest | class |
Drupal\ |
core/ |
Tests that the widget works as expected for anonymous users. | |||
| WidgetBase | abstract class |
Drupal\ |
core/ |
Base class for 'Field widget' plugin implementations. | 22 | 22 | |
| WidgetBaseInterface | interface |
Drupal\ |
core/ |
Base interface definition for "Field widget" plugins. | 1 | ||
| WidgetInterface | interface |
Drupal\ |
core/ |
Interface definition for field widget plugins. | 1 | 1 | |
| WidgetOEmbedTest | class |
Drupal\ |
core/ |
Tests that oEmbed media can be added in the Media library's widget. | |||
| WidgetPluginManager | class |
Drupal\ |
core/ |
Plugin type manager for field widgets. | 2 | ||
| WidgetPluginManagerTest | class |
Drupal\ |
core/ |
Tests the field widget manager. | |||
| WidgetUploadTest | class |
Drupal\ |
core/ |
Tests that uploads in the Media library's widget works as expected. | |||
| WidgetViewsTest | class |
Drupal\ |
core/ |
Tests the views in the media library widget. | |||
| WidgetWithoutTypesTest | class |
Drupal\ |
core/ |
Tests the media library widget when no media types are available. | |||
| WizardException | class |
Drupal\ |
core/ |
A custom exception class for our errors. | 1 | ||
| WizardInterface | interface |
Drupal\ |
core/ |
Defines a common interface for Views Wizard plugins. | 1 | 2 | |
| WizardPluginBase | abstract class |
Drupal\ |
core/ |
Base class for Views wizard plugins. | 11 | 12 | |
| WizardPluginBaseKernelTest | class |
Drupal\ |
core/ |
Tests the wizard base plugin class. | |||
| WizardPluginBaseTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\views\Plugin\views\wizard\WizardPluginBase | |||
| WizardTest | class |
Drupal\ |
core/ |
Tests the comment module integration into the wizard. | |||
| WizardTest | class |
Drupal\ |
core/ |
Tests the wizard. | |||
| WizardTestBase | abstract class |
Drupal\ |
core/ |
Views UI wizard tests. | 12 | 4 | |
| WordLevelDiff | class |
Drupal\ |
core/ |
@todo document @private @subpackage DifferenceEngine | 1 |