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
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. 82
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. 1
RevertOverridesFormTest class Drupal\Tests\layout_builder\Unit core/modules/layout_builder/tests/src/Unit/RevertOverridesFormTest.php Tests the Layout Builder revert overrides form.
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 22
RevisionableStorageInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/RevisionableStorageInterface.php A storage that supports revisionable entity types. 1 8
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 18
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.
RevisionVersionHistoryTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/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.
RevisionViewTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/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
RfcLogLevel class Drupal\Core\Logger core/lib/Drupal/Core/Logger/RfcLogLevel.php Defines various logging severity levels. 28
Role class Drupal\user\Entity core/modules/user/src/Entity/Role.php Defines the user role entity class. 152 1
Role class Drupal\user\Plugin\views\access core/modules/user/src/Plugin/views/access/Role.php Access plugin that provides role-based access control. 1
Role class Drupal\user\Plugin\migrate\source\d6 core/modules/user/src/Plugin/migrate/source/d6/Role.php Drupal 6 role source from database. 1
Role class Drupal\user\Plugin\migrate\source\d7 core/modules/user/src/Plugin/migrate/source/d7/Role.php Drupal 7 role source from database. 1
RoleAccessCheck class Drupal\user\Access core/modules/user/src/Access/RoleAccessCheck.php Determines access to routes based on roles. 1 2

Other projects


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