Classes, traits, and interfaces - main - 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 1529

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
VariableMultiRow class Drupal\migrate_drupal\Plugin\migrate\source core/modules/migrate_drupal/src/Plugin/migrate/source/VariableMultiRow.php Drupal 6/7 multiple variables source from database. 1 2
VariableMultiRowTest class Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableMultiRowTest.php Tests the variable multirow source plugin.
VariableTest class Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/VariableTest.php Tests the variable source plugin.
VariableTest class Drupal\Tests\Component\Utility core/tests/Drupal/Tests/Component/Utility/VariableTest.php Test variable export functionality in Variable component.
VariableTestMock class Drupal\Tests\Component\Utility core/tests/Drupal/Tests/Component/Utility/VariableTest.php A class for testing Variable::callableToString().
VariableTranslation class Drupal\migrate_drupal\Plugin\migrate\source\d6 core/modules/migrate_drupal/src/Plugin/migrate/source/d6/VariableTranslation.php Drupal 6 i18n_variable source from database. 1
VariableTranslation class Drupal\migrate_drupal\Plugin\migrate\source\d7 core/modules/migrate_drupal/src/Plugin/migrate/source/d7/VariableTranslation.php Drupal 7 variable_store source from database. 1
VariableTranslationCheckRequirementsTest class Drupal\Tests\migrate_drupal\Kernel\d6 core/modules/migrate_drupal/tests/src/Kernel/d6/VariableTranslationCheckRequirementsTest.php Tests check requirements for variable translation source plugin.
VariableTranslationTest class Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source\d6 core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d6/VariableTranslationTest.php Tests the variable source plugin.
VariableTranslationTest class Drupal\Tests\migrate_drupal\Kernel\Plugin\migrate\source\d7 core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d7/VariableTranslationTest.php Tests the variable source plugin.
VariantBase abstract class Drupal\Core\Display core/lib/Drupal/Core/Display/VariantBase.php Provides a base class for DisplayVariant plugins. 4 4
VariantInterface interface Drupal\Core\Display core/lib/Drupal/Core/Display/VariantInterface.php Provides an interface for DisplayVariant plugins. 3
VariantManager class Drupal\Core\Display core/lib/Drupal/Core/Display/VariantManager.php Manages discovery of display variant plugins. 2
VariationCache class Drupal\Core\Cache core/lib/Drupal/Core/Cache/VariationCache.php Wraps a regular cache backend to make it support cache contexts. 3
VariationCacheFactory class Drupal\Core\Cache core/lib/Drupal/Core/Cache/VariationCacheFactory.php Defines the variation cache factory. 2
VariationCacheFactoryInterface interface Drupal\Core\Cache core/lib/Drupal/Core/Cache/VariationCacheFactoryInterface.php An interface defining variation cache factory classes. 1 3
VariationCacheInterface interface Drupal\Core\Cache core/lib/Drupal/Core/Cache/VariationCacheInterface.php Defines an interface for variation cache implementations. 1 5 7
VariationCacheTest class Drupal\Tests\Core\Cache core/tests/Drupal/Tests/Core/Cache/VariationCacheTest.php Tests Drupal\Core\Cache\VariationCache.
VegetableInterface interface Drupal\Tests\Component\Plugin\Fixtures\vegetable core/tests/Drupal/Tests/Component/Plugin/Fixtures/vegetable/VegetableInterface.php Provides an interface for test plugins. 1 1
VendorHardeningExcluder final class Drupal\package_manager\PathExcluder core/modules/package_manager/src/PathExcluder/VendorHardeningExcluder.php Excludes vendor hardening files from stage operations. 1
VendorHardeningExcluderTest class Drupal\Tests\package_manager\Kernel\PathExcluder core/modules/package_manager/tests/src/Kernel/PathExcluder/VendorHardeningExcluderTest.php Tests Vendor Hardening Excluder.
VendorHardeningPlugin class Drupal\Composer\Plugin\VendorHardening composer/Plugin/VendorHardening/VendorHardeningPlugin.php A Composer plugin to clean out your project's vendor directory. 1
VendorHardeningPluginTest class Drupal\Tests\Composer\Plugin\VendorHardening core/tests/Drupal/Tests/Composer/Plugin/VendorHardening/VendorHardeningPluginTest.php Tests Drupal\Composer\Plugin\VendorHardening\VendorHardeningPlugin.
Version final class Drupal\Tests\Component\Annotation\Doctrine\Fixtures\Annotation core/tests/Drupal/Tests/Component/Annotation/Doctrine/Fixtures/Annotation/Version.php Plugin annotation @Target("PROPERTY");
VersionById class Drupal\jsonapi\Revisions core/modules/jsonapi/src/Revisions/VersionById.php Defines a revision ID implementation for entity revision ID values. 1 2
VersionByRel class Drupal\jsonapi\Revisions core/modules/jsonapi/src/Revisions/VersionByRel.php Revision ID implementation for the default or latest revisions. 2 2
VersionHistoryController class Drupal\Core\Entity\Controller core/lib/Drupal/Core/Entity/Controller/VersionHistoryController.php Provides a controller showing revision history for an entity. 6
VersionHistoryLocalTasks class Drupal\Core\Entity\Plugin\Derivative core/lib/Drupal/Core/Entity/Plugin/Derivative/VersionHistoryLocalTasks.php Provides version history local tasks for revisionable entities. 1
VersionNegotiator class Drupal\jsonapi\Revisions core/modules/jsonapi/src/Revisions/VersionNegotiator.php Provides a version negotiator manager. 1 2
VersionNegotiatorInterface interface Drupal\jsonapi\Revisions core/modules/jsonapi/src/Revisions/VersionNegotiatorInterface.php Defines the common interface for all version negotiators. 2
VersionNegotiatorTest class Drupal\Tests\jsonapi\Kernel\Revisions core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php The test class for version negotiators.
VersionNotFoundException class Drupal\jsonapi\Revisions core/modules/jsonapi/src/Revisions/VersionNotFoundException.php Used when a version ID is valid, but the requested version does not exist.
VersionTest class Drupal\Tests\ckeditor5\Unit core/modules/ckeditor5/tests/src/Unit/VersionTest.php Test the CKEditor version.
VerticalTabs class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/VerticalTabs.php Provides a render element for vertical tabs in a form.
Vid class Drupal\node\Plugin\views\argument core/modules/node/src/Plugin/views/argument/Vid.php Argument handler to accept a node revision id.
VideoFile class Drupal\media\Plugin\media\Source core/modules/media/src/Plugin/media/Source/VideoFile.php Media source wrapping around a video file.
View class Drupal\views\Element core/modules/views/src/Element/View.php Provides a render element to display a view. 1
View class Drupal\views\Entity core/modules/views/src/Entity/View.php Defines a View configuration entity class. 76
View class Drupal\views\Plugin\views\area core/modules/views/src/Plugin/views/area/View.php Views area handlers. Insert a view inside of an area. 1
ViewAddForm class Drupal\views_ui core/modules/views_ui/src/ViewAddForm.php Form controller for the Views add form.
ViewAjaxController class Drupal\views\Controller core/modules/views/src/Controller/ViewAjaxController.php Defines a controller to load a view via AJAX. 2
ViewAjaxControllerTest class Drupal\Tests\views\Unit\Controller core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php Tests Drupal\views\Controller\ViewAjaxController.
ViewAjaxResponse class Drupal\views\Ajax core/modules/views/src/Ajax/ViewAjaxResponse.php Custom JSON response object for an ajax view response. 2
ViewAjaxTest class Drupal\Tests\views\Functional core/modules/views/tests/src/Functional/ViewAjaxTest.php Tests the ajax view functionality.
ViewDuplicateForm class Drupal\views_ui core/modules/views_ui/src/ViewDuplicateForm.php Form controller for the Views duplicate form.
ViewEditForm class Drupal\views_ui core/modules/views_ui/src/ViewEditForm.php Form controller for the Views edit form.
ViewEditTest class Drupal\Tests\views_ui\Functional core/modules/views_ui/tests/src/Functional/ViewEditTest.php Tests some general functionality of editing views, like deleting a view.
ViewElementTest class Drupal\Tests\views\Kernel core/modules/views/tests/src/Kernel/ViewElementTest.php Tests the view render element.
ViewElementTest class Drupal\Tests\views\Functional core/modules/views/tests/src/Functional/ViewElementTest.php Tests the view render element.
ViewEntityDependenciesTest class Drupal\Tests\views\Kernel\Entity core/modules/views/tests/src/Kernel/Entity/ViewEntityDependenciesTest.php Tests the calculation of dependencies for views.

Other projects


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