Classes, traits, and interfaces - 9.5.x - drupal

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 1523

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
VocabularyTranslationTest class Drupal\Tests\taxonomy\Kernel\Plugin\migrate\source\d7 core/modules/taxonomy/tests/src/Kernel/Plugin/migrate/source/d7/VocabularyTranslationTest.php Tests D7 i18n vocabulary source plugin.
VocabularyTranslationTest class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/VocabularyTranslationTest.php Tests content translation for vocabularies.
VocabularyUiTest class Drupal\Tests\taxonomy\Functional core/modules/taxonomy/tests/src/Functional/VocabularyUiTest.php Tests the taxonomy vocabulary interface.
VocabularyVid class Drupal\taxonomy\Plugin\views\argument core/modules/taxonomy/src/Plugin/views/argument/VocabularyVid.php Argument handler to accept a vocabulary id.
VocabularyXmlAnonTest class Drupal\Tests\taxonomy\Functional\Rest core/modules/taxonomy/tests/src/Functional/Rest/VocabularyXmlAnonTest.php @group rest
VocabularyXmlBasicAuthTest class Drupal\Tests\taxonomy\Functional\Rest core/modules/taxonomy/tests/src/Functional/Rest/VocabularyXmlBasicAuthTest.php @group rest
VocabularyXmlCookieTest class Drupal\Tests\taxonomy\Functional\Rest core/modules/taxonomy/tests/src/Functional/Rest/VocabularyXmlCookieTest.php @group rest
Watchdog class Drupal\dblog\Plugin\views\wizard core/modules/dblog/src/Plugin/views/wizard/Watchdog.php Defines a wizard for the watchdog table.
WebAssert class Drupal\Tests core/tests/Drupal/Tests/WebAssert.php Defines a class with methods for asserting presence of elements during tests. 1 4
WebAssertArgumentsTest class Drupal\Tests\Core\Assert core/tests/Drupal/Tests/Core/Assert/WebAssertArgumentsTest.php Tests that calling WebAssert methods with extra arguments leads to errors.
WebAssertTest class Drupal\FunctionalTests core/tests/Drupal/FunctionalTests/WebAssertTest.php Tests WebAssert functionality.
WebDriverCurlService class Drupal\FunctionalJavascriptTests core/tests/Drupal/FunctionalJavascriptTests/WebDriverCurlService.php Provides a curl service to interact with Selenium driver. 1
WebDriverTestBase abstract class Drupal\FunctionalJavascriptTests core/tests/Drupal/FunctionalJavascriptTests/WebDriverTestBase.php Runs a browser test using a driver that supports JavaScript. 144 139
WebDriverWebAssert class Drupal\FunctionalJavascriptTests core/tests/Drupal/FunctionalJavascriptTests/WebDriverWebAssert.php Defines a JSWebAssert with no support for status code and header assertions.
WeekDate class Drupal\views\Plugin\views\argument core/modules/views/src/Plugin/views/argument/WeekDate.php Argument handler for a week.
WeekDate class Drupal\datetime\Plugin\views\argument core/modules/datetime/src/Plugin/views/argument/WeekDate.php Argument handler for a week.
Weight class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/Weight.php Provides a form element for input of a weight. 1
WeightTest class Drupal\KernelTests\Core\Render\Element core/tests/Drupal/KernelTests/Core/Render/Element/WeightTest.php @coversDefaultClass \Drupal\Core\Render\Element\Weight[[api-linebreak]] @group Render
WhosOnlineBlockTest class Drupal\Tests\user\Kernel core/modules/user/tests/src/Kernel/WhosOnlineBlockTest.php Tests the Who's Online Block.
WideModalRenderer class Drupal\dialog_renderer_test\Render\MainContent core/modules/system/tests/modules/dialog_renderer_test/src/Render/MainContent/WideModalRenderer.php Default main content renderer for wide modal dialog requests. 3
WidgetAccessTest class Drupal\Tests\media_library\FunctionalJavascript core/modules/media_library/tests/src/FunctionalJavascript/WidgetAccessTest.php Tests the media library UI access.
WidgetAnonymousTest class Drupal\Tests\media_library\FunctionalJavascript core/modules/media_library/tests/src/FunctionalJavascript/WidgetAnonymousTest.php Tests that the widget works as expected for anonymous users.
WidgetBase abstract class Drupal\Core\Field core/lib/Drupal/Core/Field/WidgetBase.php Base class for 'Field widget' plugin implementations. 22 22
WidgetBaseInterface interface Drupal\Core\Field core/lib/Drupal/Core/Field/WidgetBaseInterface.php Base interface definition for "Field widget" plugins. 1
WidgetInterface interface Drupal\Core\Field core/lib/Drupal/Core/Field/WidgetInterface.php Interface definition for field widget plugins. 1 1
WidgetOEmbedTest class Drupal\Tests\media_library\FunctionalJavascript core/modules/media_library/tests/src/FunctionalJavascript/WidgetOEmbedTest.php Tests that oEmbed media can be added in the Media library's widget.
WidgetPluginManager class Drupal\Core\Field core/lib/Drupal/Core/Field/WidgetPluginManager.php Plugin type manager for field widgets. 2
WidgetPluginManagerTest class Drupal\Tests\field\Kernel core/modules/field/tests/src/Kernel/WidgetPluginManagerTest.php Tests the field widget manager.
WidgetUploadTest class Drupal\Tests\media_library\FunctionalJavascript core/modules/media_library/tests/src/FunctionalJavascript/WidgetUploadTest.php Tests that uploads in the Media library's widget works as expected.
WidgetViewsTest class Drupal\Tests\media_library\FunctionalJavascript core/modules/media_library/tests/src/FunctionalJavascript/WidgetViewsTest.php Tests the views in the media library widget.
WidgetWithoutTypesTest class Drupal\Tests\media_library\FunctionalJavascript core/modules/media_library/tests/src/FunctionalJavascript/WidgetWithoutTypesTest.php Tests the media library widget when no media types are available.
WildcardHtmlSupportTest class Drupal\Tests\ckeditor5\Kernel core/modules/ckeditor5/tests/src/Kernel/WildcardHtmlSupportTest.php @covers \Drupal\ckeditor5\Plugin\CKEditor5PluginManager::getCKEditor5PluginConfig()[[api-linebreak]] @group ckeditor5 @internal
WizardException class Drupal\views\Plugin\views\wizard core/modules/views/src/Plugin/views/wizard/WizardException.php A custom exception class for our errors. 1
WizardInterface interface Drupal\views\Plugin\views\wizard core/modules/views/src/Plugin/views/wizard/WizardInterface.php Defines a common interface for Views Wizard plugins. 1 2
WizardPluginBase abstract class Drupal\views\Plugin\views\wizard core/modules/views/src/Plugin/views/wizard/WizardPluginBase.php Base class for Views wizard plugins. 11 12
WizardPluginBaseKernelTest class Drupal\Tests\views\Kernel\Wizard core/modules/views/tests/src/Kernel/Wizard/WizardPluginBaseKernelTest.php Tests the wizard base plugin class.
WizardPluginBaseTest class Drupal\Tests\views\Unit core/modules/views/tests/src/Unit/WizardPluginBaseTest.php @coversDefaultClass \Drupal\views\Plugin\views\wizard\WizardPluginBase[[api-linebreak]]
WizardTest class Drupal\Tests\comment\Functional\Views core/modules/comment/tests/src/Functional/Views/WizardTest.php Tests the comment module integration into the wizard.
WizardTest class Drupal\Tests\views_ui\Functional core/modules/views_ui/tests/src/Functional/WizardTest.php Tests the wizard.
WizardTestBase abstract class Drupal\Tests\views\Functional\Wizard core/modules/views/tests/src/Functional/Wizard/WizardTestBase.php Views UI wizard tests. 12 4
WordLevelDiff class Drupal\Component\Diff core/lib/Drupal/Component/Diff/WordLevelDiff.php @todo document @private @subpackage DifferenceEngine 1
Workflow class Drupal\workflows\Entity core/modules/workflows/src/Entity/Workflow.php Defines the workflow entity. 27
WorkflowAccessControlHandler class Drupal\workflows core/modules/workflows/src/WorkflowAccessControlHandler.php Access controller for the Workflow entity.
WorkflowAccessControlHandlerTest class Drupal\Tests\workflows\Kernel core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php @coversDefaultClass \Drupal\workflows\WorkflowAccessControlHandler[[api-linebreak]] @group workflows
WorkflowAddForm class Drupal\workflows\Form core/modules/workflows/src/Form/WorkflowAddForm.php Form for adding workflows.
WorkflowCustomAccessType class Drupal\workflow_type_test\Plugin\WorkflowType core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/WorkflowCustomAccessType.php A test workflow with custom state/transition access rules applied. 1
WorkflowCustomStateTransitionAccessTest class Drupal\Tests\workflows\Functional core/modules/workflows/tests/src/Functional/WorkflowCustomStateTransitionAccessTest.php Test custom provided workflow access for state/transition operations.
WorkflowDeleteForm class Drupal\workflows\Form core/modules/workflows/src/Form/WorkflowDeleteForm.php Builds the form to delete Workflow entities.
WorkflowDependenciesTest class Drupal\Tests\workflows\Kernel core/modules/workflows/tests/src/Kernel/WorkflowDependenciesTest.php Tests configuration dependencies in workflows.
WorkflowEditForm class Drupal\workflows\Form core/modules/workflows/src/Form/WorkflowEditForm.php The form for editing workflows.

Other projects


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.