You are here

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

Namesort descending Type Namespace Location Description Direct uses Use statements Strings
VariableTranslation class Drupal\migrate_drupal\Plugin\migrate\source\d7 core/modules/migrate_drupal/src/Plugin/migrate/source/d7/VariableTranslation.php Gets Drupal variable_store source from database.
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. 3 3
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
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
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 @coversDefaultClass \Drupal\Composer\Plugin\VendorHardening\VendorHardeningPlugin @group VendorHardening
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
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\system\Functional\Module core/modules/system/tests/src/Functional/Module/VersionTest.php Tests module version dependencies.
VerticalTabs class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/VerticalTabs.php Provides a render element for vertical tabs in a form.
VfsThemeExtensionList class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/BaseThemeMissingTest.php Test theme extension list class.
Vid class Drupal\node\Plugin\views\argument core/modules/node/src/Plugin/views/argument/Vid.php Argument handler to accept a node revision id. 1
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. 54
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. 1
ViewAjaxControllerTest class Drupal\Tests\views\Unit\Controller core/modules/views/tests/src/Unit/Controller/ViewAjaxControllerTest.php @coversDefaultClass \Drupal\views\Controller\ViewAjaxController @group views
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\Functional core/modules/views/tests/src/Functional/ViewElementTest.php Tests the view render element.
ViewElementTest class Drupal\Tests\views\Kernel core/modules/views/tests/src/Kernel/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 17
ViewExecutable class Drupal\views core/modules/views/src/ViewExecutable.php Represents a view as a whole. 113
ViewExecutableFactory class Drupal\views core/modules/views/src/ViewExecutableFactory.php Defines the cache backend factory. 8 2
ViewExecutableFactoryTest class Drupal\Tests\views\Unit core/modules/views/tests/src/Unit/ViewExecutableFactoryTest.php @coversDefaultClass \Drupal\views\ViewExecutableFactory @group views
ViewExecutableTest class Drupal\Tests\views\Kernel core/modules/views/tests/src/Kernel/ViewExecutableTest.php Tests the ViewExecutable class.
ViewExecutableTest class Drupal\Tests\views\Unit core/modules/views/tests/src/Unit/ViewExecutableTest.php @coversDefaultClass \Drupal\views\ViewExecutable @group views
ViewFormBase abstract class Drupal\views_ui core/modules/views_ui/src/ViewFormBase.php Base form for Views forms. 4
ViewHalJsonAnonTest class Drupal\Tests\views\Functional\Hal core/modules/views/tests/src/Functional/Hal/ViewHalJsonAnonTest.php @group hal
ViewHalJsonBasicAuthTest class Drupal\Tests\views\Functional\Hal core/modules/views/tests/src/Functional/Hal/ViewHalJsonBasicAuthTest.php @group hal
ViewHalJsonCookieTest class Drupal\Tests\views\Functional\Hal core/modules/views/tests/src/Functional/Hal/ViewHalJsonCookieTest.php @group hal
ViewJsonAnonTest class Drupal\Tests\views\Functional\Rest core/modules/views/tests/src/Functional/Rest/ViewJsonAnonTest.php @group rest
ViewJsonBasicAuthTest class Drupal\Tests\views\Functional\Rest core/modules/views/tests/src/Functional/Rest/ViewJsonBasicAuthTest.php @group rest
ViewJsonCookieTest class Drupal\Tests\views\Functional\Rest core/modules/views/tests/src/Functional/Rest/ViewJsonCookieTest.php @group rest
ViewListBuilder class Drupal\views_ui core/modules/views_ui/src/ViewListBuilder.php Defines a class to build a listing of view entities. 1 1

Pages

Other projects