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
RestResourceConfigXmlBasicAuthTest class Drupal\Tests\rest\Functional\Rest core/modules/rest/tests/src/Functional/Rest/RestResourceConfigXmlBasicAuthTest.php Tests Rest Resource Config Xml Basic Auth.
RestResourceConfigXmlCookieTest class Drupal\Tests\rest\Functional\Rest core/modules/rest/tests/src/Functional/Rest/RestResourceConfigXmlCookieTest.php Tests Rest Resource Config Xml Cookie.
RestripeCommand class Drupal\Core\Ajax core/lib/Drupal/Core/Ajax/RestripeCommand.php AJAX command for resetting the striping on a table. 2
RestTestConstraint class Drupal\rest_test\Plugin\Validation\Constraint core/modules/rest/tests/modules/rest_test/src/Plugin/Validation/Constraint/RestTestConstraint.php Adds some validations for a REST test field.
RestTestConstraintValidator class Drupal\rest_test\Plugin\Validation\Constraint core/modules/rest/tests/modules/rest_test/src/Plugin/Validation/Constraint/RestTestConstraintValidator.php Validator for \Drupal\rest_test\Plugin\Validation\Constraint\RestTestConstraint.
RestTestHooks class Drupal\rest_test\Hook core/modules/rest/tests/modules/rest_test/src/Hook/RestTestHooks.php Hook implementations for rest_test.
RestTestViewsHooks class Drupal\rest_test_views\Hook core/modules/rest/tests/modules/rest_test_views/src/Hook/RestTestViewsHooks.php Hook implementations for rest_test_views.
Result class Drupal\views\Plugin\views\area core/modules/views/src/Plugin/views/area/Result.php Views area handler to display some configurable result summary. 1
Result class Drupal\mysqli\Driver\Database\mysqli core/modules/mysqli/src/Driver/Database/mysqli/Result.php Class for mysqli-provided results of a data query language (DQL) statement.
ResultBase abstract class Drupal\Core\Database\Statement core/lib/Drupal/Core/Database/Statement/ResultBase.php Base class for results of a data query language (DQL) statement. 3 1
ResultRow class Drupal\views core/modules/views/src/ResultRow.php A class representing a view result row. 77
ResultTest class Drupal\Tests\views\Unit\Plugin\area core/modules/views/tests/src/Unit/Plugin/area/ResultTest.php Tests Drupal\views\Plugin\views\area\Result.
ReverseContainer final class Drupal\Component\DependencyInjection core/lib/Drupal/Component/DependencyInjection/ReverseContainer.php Retrieves service IDs from the container for public services. 6
ReverseContainerTest class Drupal\Tests\Component\DependencyInjection core/tests/Drupal/Tests/Component/DependencyInjection/ReverseContainerTest.php Tests the ReverseContainer class.
ReverseProxyMiddleware class Drupal\Core\StackMiddleware core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php Provides support for reverse proxies. 3 2
ReverseProxyMiddlewareTest class Drupal\Tests\Core\StackMiddleware core/tests/Drupal/Tests/Core/StackMiddleware/ReverseProxyMiddlewareTest.php Unit test the reverse proxy stack middleware.
RevertOverridesForm class Drupal\layout_builder\Form core/modules/layout_builder/src/Form/RevertOverridesForm.php Reverts the overridden layout to the defaults.
ReviewForm class Drupal\migrate_drupal_ui\Form core/modules/migrate_drupal_ui/src/Form/ReviewForm.php Migrate Upgrade review form. 1
RevisionableContentEntityBase abstract class Drupal\Core\Entity core/lib/Drupal/Core/Entity/RevisionableContentEntityBase.php Provides a content entity with extended support for revisions. 1 2
RevisionableContentEntityBaseTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/RevisionableContentEntityBaseTest.php Test the revision system.
RevisionableEntityBundleInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/RevisionableEntityBundleInterface.php Provides an interface defining a revisionable entity bundle. 4 5
RevisionableInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/RevisionableInterface.php Provides methods for an entity to support revisions. 3 21
RevisionableStorageInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/RevisionableStorageInterface.php A storage that supports revisionable entity types. 1 6
RevisionCreateTimestampTest class Drupal\Tests\node\Kernel\Views core/modules/node/tests/src/Kernel/Views/RevisionCreateTimestampTest.php Ensures that the revision create time can be accessed in views.
RevisionDeleteForm class Drupal\Core\Entity\Form core/lib/Drupal/Core/Entity/Form/RevisionDeleteForm.php Provides a form for deleting an entity revision. 10
RevisionDeleteFormTest class Drupal\FunctionalTests\Entity core/tests/Drupal/FunctionalTests/Entity/RevisionDeleteFormTest.php Tests deleting a revision with revision delete form.
RevisionHtmlRouteProvider class Drupal\Core\Entity\Routing core/lib/Drupal/Core/Entity/Routing/RevisionHtmlRouteProvider.php Provides entity revision routes. 10
RevisionLink class Drupal\node\Plugin\views\field core/modules/node/src/Plugin/views/field/RevisionLink.php Field handler to present a link to a node revision. 2 1
RevisionLinkDelete class Drupal\node\Plugin\views\field core/modules/node/src/Plugin/views/field/RevisionLinkDelete.php Field handler to present link to delete a node revision. 2
RevisionLinkDeleteTest class Drupal\Tests\node\Unit\Plugin\views\field core/modules/node/tests/src/Unit/Plugin/views/field/RevisionLinkDeleteTest.php Tests Drupal\node\Plugin\views\field\RevisionLinkDelete.
RevisionLinkRevert class Drupal\node\Plugin\views\field core/modules/node/src/Plugin/views/field/RevisionLinkRevert.php Field handler to present a link to revert a node to a revision. 1
RevisionLinkRevertTest class Drupal\Tests\node\Unit\Plugin\views\field core/modules/node/tests/src/Unit/Plugin/views/field/RevisionLinkRevertTest.php Tests Drupal\node\Plugin\views\field\RevisionLinkRevert.
RevisionLinkTest class Drupal\Tests\node\Unit\Plugin\views\field core/modules/node/tests/src/Unit/Plugin/views/field/RevisionLinkTest.php Tests Drupal\node\Plugin\views\field\RevisionLink.
RevisionLinkTest class Drupal\Tests\node\Functional\Views core/modules/node/tests/src/Functional/Views/RevisionLinkTest.php Tests the different revision link handlers.
RevisionLogEntityTrait trait Drupal\Core\Entity core/lib/Drupal/Core/Entity/RevisionLogEntityTrait.php Provides a trait for accessing revision logging and ownership information. 1
RevisionLogInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/RevisionLogInterface.php Defines methods for an entity that supports revision logging and ownership. 8 17
RevisionRelationshipsTest class Drupal\Tests\node\Kernel\Views core/modules/node/tests/src/Kernel/Views/RevisionRelationshipsTest.php Tests the integration of node_revision table of node module.
RevisionRelationshipsTest class Drupal\Tests\block_content\Kernel\Views core/modules/block_content/tests/src/Kernel/Views/RevisionRelationshipsTest.php Tests the integration of block_content_revision table.
RevisionRevertForm class Drupal\Core\Entity\Form core/lib/Drupal/Core/Entity/Form/RevisionRevertForm.php Provides a form for reverting an entity revision. 10
RevisionRevertFormTest class Drupal\FunctionalTests\Entity core/tests/Drupal/FunctionalTests/Entity/RevisionRevertFormTest.php Tests reverting a revision with revision revert form.
RevisionRouteProviderTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/RevisionRouteProviderTest.php Tests revision route provider.
RevisionRouteProviderTest class Drupal\FunctionalTests\Entity core/tests/Drupal/FunctionalTests/Entity/RevisionRouteProviderTest.php Tests revision route provider.
RevisionTestItem class Drupal\workspaces_test\Plugin\Field\FieldType core/modules/workspaces/tests/modules/workspaces_test/src/Plugin/Field/FieldType/RevisionTestItem.php Defines the 'revision_test_field' field type.
RevisionUidTest class Drupal\Tests\node\Kernel\Views core/modules/node/tests/src/Kernel/Views/RevisionUidTest.php Tests the node_revision_uid field.
RevisionUserTest class Drupal\Tests\media\Kernel\Views core/modules/media/tests/src/Kernel/Views/RevisionUserTest.php Tests the media_revision_user field.
RevisionUserTest class Drupal\Tests\block_content\Kernel\Views core/modules/block_content/tests/src/Kernel/Views/RevisionUserTest.php Tests the block_content_revision_user field.
RevisionVersionHistoryTest class Drupal\FunctionalTests\Entity core/tests/Drupal/FunctionalTests/Entity/RevisionVersionHistoryTest.php Tests version history page.
RevisionVersionHistoryTranslatableTest final class Drupal\FunctionalTests\Entity core/tests/Drupal/FunctionalTests/Entity/RevisionVersionHistoryTranslatableTest.php Tests version history page with translations.
RevisionViewTest class Drupal\FunctionalTests\Entity core/tests/Drupal/FunctionalTests/Entity/RevisionViewTest.php Tests revision view page.
RfcLoggerTrait trait Drupal\Core\Logger core/lib/Drupal/Core/Logger/RfcLoggerTrait.php A copy of \Psr\Log\LoggerTrait that uses RFC 5424 compliant log levels. 6

Other projects


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