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
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. 5
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.
ViewEntityInterface interface Drupal\views core/modules/views/src/ViewEntityInterface.php Defines an interface for View storage classes. 2 23
ViewExecutable class Drupal\views core/modules/views/src/ViewExecutable.php Represents a view as a whole. 150
ViewExecutableFactory class Drupal\views core/modules/views/src/ViewExecutableFactory.php Defines the cache backend factory. 11 2
ViewExecutableFactoryTest class Drupal\Tests\views\Unit core/modules/views/tests/src/Unit/ViewExecutableFactoryTest.php Tests Drupal\views\ViewExecutableFactory.
ViewExecutableTest class Drupal\Tests\views\Unit core/modules/views/tests/src/Unit/ViewExecutableTest.php Tests Drupal\views\ViewExecutable.
ViewExecutableTest class Drupal\Tests\views\Kernel core/modules/views/tests/src/Kernel/ViewExecutableTest.php Tests the ViewExecutable class.
ViewFormBase abstract class Drupal\views_ui core/modules/views_ui/src/ViewFormBase.php Base form for Views forms. 4
ViewJsonAnonTest class Drupal\Tests\views\Functional\Rest core/modules/views/tests/src/Functional/Rest/ViewJsonAnonTest.php Tests View Json Anon.
ViewJsonBasicAuthTest class Drupal\Tests\views\Functional\Rest core/modules/views/tests/src/Functional/Rest/ViewJsonBasicAuthTest.php Tests View Json Basic Auth.
ViewJsonCookieTest class Drupal\Tests\views\Functional\Rest core/modules/views/tests/src/Functional/Rest/ViewJsonCookieTest.php Tests View Json Cookie.
ViewListBuilder class Drupal\views_ui core/modules/views_ui/src/ViewListBuilder.php Defines a class to build a listing of view entities. 1 1
ViewListBuilderTest class Drupal\Tests\views_ui\Unit core/modules/views_ui/tests/src/Unit/ViewListBuilderTest.php Tests Drupal\views_ui\ViewListBuilder.

Other projects


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