Classes, traits, and interfaces - 9.5.x - 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 1523

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
RestPermissions class Drupal\rest core/modules/rest/src/RestPermissions.php Provides rest module permissions.
RestPermissionsTest class Drupal\Tests\rest\Kernel\Entity core/modules/rest/tests/src/Kernel/Entity/RestPermissionsTest.php @coversDefaultClass \Drupal\rest\RestPermissions[[api-linebreak]]
RestRegisterUserTest class Drupal\Tests\hal\Functional\user core/modules/hal/tests/src/Functional/user/RestRegisterUserTest.php Tests user registration via REST resource.
RestResource class Drupal\rest\Annotation core/modules/rest/src/Annotation/RestResource.php Defines a REST resource annotation object.
RestResourceConfig class Drupal\rest\Entity core/modules/rest/src/Entity/RestResourceConfig.php Defines a RestResourceConfig configuration entity class. 11
RestResourceConfigHalJsonAnonTest class Drupal\Tests\hal\Functional\rest core/modules/hal/tests/src/Functional/rest/RestResourceConfigHalJsonAnonTest.php @group hal @group legacy
RestResourceConfigHalJsonBasicAuthTest class Drupal\Tests\hal\Functional\rest core/modules/hal/tests/src/Functional/rest/RestResourceConfigHalJsonBasicAuthTest.php @group hal @group legacy
RestResourceConfigHalJsonCookieTest class Drupal\Tests\hal\Functional\rest core/modules/hal/tests/src/Functional/rest/RestResourceConfigHalJsonCookieTest.php @group hal @group legacy
RestResourceConfigInterface interface Drupal\rest core/modules/rest/src/RestResourceConfigInterface.php Defines a configuration entity to store enabled REST resources. 1 16
RestResourceConfigJsonAnonTest class Drupal\Tests\rest\Functional\Rest core/modules/rest/tests/src/Functional/Rest/RestResourceConfigJsonAnonTest.php @group rest
RestResourceConfigJsonBasicAuthTest class Drupal\Tests\rest\Functional\Rest core/modules/rest/tests/src/Functional/Rest/RestResourceConfigJsonBasicAuthTest.php @group rest
RestResourceConfigJsonCookieTest class Drupal\Tests\rest\Functional\Rest core/modules/rest/tests/src/Functional/Rest/RestResourceConfigJsonCookieTest.php @group rest
RestResourceConfigResourceTestBase abstract class Drupal\Tests\rest\Functional\Rest core/modules/rest/tests/src/Functional/Rest/RestResourceConfigResourceTestBase.php 9 3
RestResourceConfigTest class Drupal\Tests\rest\Unit\Entity core/modules/rest/tests/src/Unit/Entity/RestResourceConfigTest.php @coversDefaultClass \Drupal\rest\Entity\RestResourceConfig[[api-linebreak]]
RestResourceConfigTest class Drupal\Tests\rest\Kernel\Entity core/modules/rest/tests/src/Kernel/Entity/RestResourceConfigTest.php @coversDefaultClass \Drupal\rest\Entity\RestResourceConfig[[api-linebreak]]
RestResourceConfigTest class Drupal\Tests\hal\Kernel\rest\Entity core/modules/hal/tests/src/Kernel/rest/Entity/RestResourceConfigTest.php @coversDefaultClass \Drupal\rest\Entity\RestResourceConfig[[api-linebreak]]
RestResourceConfigTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/RestResourceConfigTest.php JSON:API integration test for the "RestResourceConfig" config entity type.
RestResourceConfigXmlAnonTest class Drupal\Tests\rest\Functional\Rest core/modules/rest/tests/src/Functional/Rest/RestResourceConfigXmlAnonTest.php @group rest
RestResourceConfigXmlBasicAuthTest class Drupal\Tests\rest\Functional\Rest core/modules/rest/tests/src/Functional/Rest/RestResourceConfigXmlBasicAuthTest.php @group rest
RestResourceConfigXmlCookieTest class Drupal\Tests\rest\Functional\Rest core/modules/rest/tests/src/Functional/Rest/RestResourceConfigXmlCookieTest.php @group rest
RestripeCommand class Drupal\Core\Ajax core/lib/Drupal/Core/Ajax/RestripeCommand.php AJAX command for resetting the striping on a table. 2
RestSettingsDeletionUpdateTest class Drupal\Tests\rest\Functional\Update core/modules/rest/tests/src/Functional/Update/RestSettingsDeletionUpdateTest.php Ensures that update hook is run properly for deleting obsolete REST settings.
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.
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
ResultRow class Drupal\views core/modules/views/src/ResultRow.php A class representing a view result row. 67
ResultTest class Drupal\Tests\views\Unit\Plugin\area core/modules/views/tests/src/Unit/Plugin/area/ResultTest.php @coversDefaultClass \Drupal\views\Plugin\views\area\Result[[api-linebreak]] @group views
RetrieveFileTest class Drupal\Tests\system\Functional\System core/modules/system/tests/src/Functional/System/RetrieveFileTest.php Tests HTTP file fetching and error handling.
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 @runTestsInSeparateProcesses The reverse container uses a static to maintain information across container rebuilds.
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
ReviewPageTest class Drupal\Tests\tracker\Functional\Migrate core/modules/tracker/tests/src/Functional/Migrate/ReviewPageTest.php Tests Review page.
RevisionableContentEntityBase abstract class Drupal\Core\Entity core/lib/Drupal/Core/Entity/RevisionableContentEntityBase.php Provides a content entity with extended support for revisions. 1 1
RevisionableContentEntityBaseTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/RevisionableContentEntityBaseTest.php Test the revision system.
RevisionableEntity abstract class Drupal\Tests\Core\Entity core/tests/Drupal/Tests/Core/Entity/EntityUrlTest.php
RevisionableEntityBundleInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/RevisionableEntityBundleInterface.php Provides an interface defining a revisionable entity bundle. 3 5
RevisionableInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/RevisionableInterface.php Provides methods for an entity to support revisions. 3 16
RevisionableStorageInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/RevisionableStorageInterface.php A storage that supports revisionable entity types. 1 1
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.
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
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.
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.
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 10
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.

Other projects


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