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
RenderTest class Drupal\KernelTests\Core\Render core/tests/Drupal/KernelTests/Core/Render/RenderTest.php Performs functional tests on \Drupal::service('renderer')->render().
RenderWebTest class Drupal\Tests\system\Functional\Common core/modules/system/tests/src/Functional/Common/RenderWebTest.php Performs integration tests on \Drupal::service('renderer')->render().
ReorderDisplays class Drupal\views_ui\Form\Ajax core/modules/views_ui/src/Form/Ajax/ReorderDisplays.php Displays the display reorder form.
ReorderHook class Drupal\Core\Hook\Attribute core/lib/Drupal/Core/Hook/Attribute/ReorderHook.php Sets the order of an already existing implementation. 11
ReplaceCommand class Drupal\Core\Ajax core/lib/Drupal/Core/Ajax/ReplaceCommand.php AJAX command for calling the jQuery replace() method. 14
ReplaceOp class Drupal\Composer\Plugin\Scaffold\Operations composer/Plugin/Scaffold/Operations/ReplaceOp.php Scaffold operation to copy or symlink from source to destination. 2
ReplaceOpTest class Drupal\Tests\Composer\Plugin\Scaffold\Integration core/tests/Drupal/Tests/Composer/Plugin/Scaffold/Integration/ReplaceOpTest.php Tests Drupal\Composer\Plugin\Scaffold\Operations\ReplaceOp.
ReplaceTitleCommand class Drupal\views\Ajax core/modules/views/src/Ajax/ReplaceTitleCommand.php Provides an AJAX command for replacing the page title. 1
ReplicaKillSwitch class Drupal\Core\Database core/lib/Drupal/Core/Database/ReplicaKillSwitch.php Provides replica server kill switch to ignore it. 1 2
ReplicaKillSwitchTest class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/ReplicaKillSwitchTest.php Tests that ReplicaKillSwitch functions correctly.
ReportFieldsTest class Drupal\Tests\views_ui\Functional core/modules/views_ui/tests/src/Functional/ReportFieldsTest.php Tests the Views fields report page.
ReportTest class Drupal\Tests\views_ui\Functional core/modules/views_ui/tests/src/Functional/ReportTest.php Tests existence of the views plugin report.
RequestContext class Drupal\Core\Routing core/lib/Drupal/Core/Routing/RequestContext.php Holds information about the current request. 18 2
RequestFormatCacheContext class Drupal\Core\Cache\Context core/lib/Drupal/Core/Cache/Context/RequestFormatCacheContext.php Defines the RequestFormatCacheContext service, for "per format" caching. 2
RequestFormatRouteFilter class Drupal\Core\Routing core/lib/Drupal/Core/Routing/RequestFormatRouteFilter.php Provides a route filter, which filters by the request format. 1 2 2
RequestFormatRouteFilterTest class Drupal\Tests\Core\Routing core/tests/Drupal/Tests/Core/Routing/RequestFormatRouteFilterTest.php Tests Drupal\Core\Routing\RequestFormatRouteFilter.
RequestHandler class Drupal\rest core/modules/rest/src/RequestHandler.php Acts as intermediate request forwarder for resource plugins. 2
RequestHandlerTest class Drupal\Tests\rest\Kernel core/modules/rest/tests/src/Kernel/RequestHandlerTest.php Test REST RequestHandler controller logic.
RequestHelper class Drupal\Core\Routing core/lib/Drupal/Core/Routing/RequestHelper.php Provides some helper methods for dealing with the request. 1
RequestPagerTest class Drupal\KernelTests\Core\Pager core/tests/Drupal/KernelTests/Core/Pager/RequestPagerTest.php Tests Drupal\Core\Pager\PagerParameters.
RequestPath class Drupal\system\Plugin\Condition core/modules/system/src/Plugin/Condition/RequestPath.php Provides a 'Request Path' condition.
RequestPathTest class Drupal\KernelTests\Core\Plugin\Condition core/tests/Drupal/KernelTests/Core/Plugin/Condition/RequestPathTest.php Tests system.module's request path condition.
RequestPolicyInterface interface Drupal\Core\PageCache core/lib/Drupal/Core/PageCache/RequestPolicyInterface.php Defines the interface for request policy implementations. 6 16
RequestSanitizer class Drupal\Core\Security core/lib/Drupal/Core/Security/RequestSanitizer.php Sanitizes user input. 2
RequestSanitizerTest class Drupal\Tests\Core\Security core/tests/Drupal/Tests/Core/Security/RequestSanitizerTest.php Tests RequestSanitizer class.
RequestSanitizerTest class Drupal\FunctionalTests\HttpKernel core/tests/Drupal/FunctionalTests/HttpKernel/RequestSanitizerTest.php Tests RequestSanitizerMiddleware.
RequestStackCacheContextBase abstract class Drupal\Core\Cache\Context core/lib/Drupal/Core/Cache/Context/RequestStackCacheContextBase.php Defines a base class for cache contexts depending only on the request stack. 12
RequeueException class Drupal\Core\Queue core/lib/Drupal/Core/Queue/RequeueException.php Throw this exception to release the item allowing it to be processed again. 3
RequiredConfigDependenciesConstraint class Drupal\Core\Config\Plugin\Validation\Constraint core/lib/Drupal/Core/Config/Plugin/Validation/Constraint/RequiredConfigDependenciesConstraint.php Checks that config dependencies contain specific types of entities.
RequiredConfigDependenciesConstraintValidator class Drupal\Core\Config\Plugin\Validation\Constraint core/lib/Drupal/Core/Config/Plugin/Validation/Constraint/RequiredConfigDependenciesConstraintValidator.php Validates the RequiredConfigDependencies constraint.
RequiredConstraint class Drupal\Core\Validation\Plugin\Validation\Constraint core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/RequiredConstraint.php Marks a field as required in a Collection constraint.
RequiredFieldStorageDefinitionInterface interface Drupal\Core\Field core/lib/Drupal/Core/Field/RequiredFieldStorageDefinitionInterface.php Defines an interface for required field storage definitions. 1 1
RequiredModuleUninstallValidator class Drupal\Core\Extension core/lib/Drupal/Core/Extension/RequiredModuleUninstallValidator.php Ensures that required modules cannot be uninstalled. 1 2
RequiredModuleUninstallValidatorTest class Drupal\Tests\Core\Extension core/tests/Drupal/Tests/Core/Extension/RequiredModuleUninstallValidatorTest.php Tests Drupal\Core\Extension\RequiredModuleUninstallValidator.
RequiredStateMissingException class Drupal\workflows\Exception core/modules/workflows/src/Exception/RequiredStateMissingException.php Indicates that a workflow does not contain a required state. 2
RequiredStatesTest class Drupal\Tests\workflows\Kernel core/modules/workflows/tests/src/Kernel/RequiredStatesTest.php Tests Workflow type's required states and configuration initialization.
RequiredStateTestType class Drupal\workflow_type_test\Plugin\WorkflowType core/modules/workflows/tests/modules/workflow_type_test/src/Plugin/WorkflowType/RequiredStateTestType.php Test workflow type.
Requirements1TestHooks class Drupal\requirements1_test\Hook core/modules/system/tests/modules/requirements1_test/src/Hook/Requirements1TestHooks.php Hook implementations for requirements1_test.
RequirementsAwareDestinationInterface interface Drupal\Tests\migrate\Unit core/modules/migrate/tests/src/Unit/MigrationTest.php Defines the RequirementsAwareDestinationInterface.
RequirementsAwareSourceInterface interface Drupal\Tests\migrate\Unit core/modules/migrate/tests/src/Unit/MigrationTest.php Defines the RequirementsAwareSourceInterface.
RequirementSeverityTest class Drupal\Tests\Core\Extension\Requirement core/tests/Drupal/Tests/Core/Extension/Requirement/RequirementSeverityTest.php Tests Drupal\Core\Extension\Requirement\RequirementSeverity.
RequirementsException class Drupal\migrate\Exception core/modules/migrate/src/Exception/RequirementsException.php Defines an exception thrown when a migration does not meet the requirements. 33
RequirementsExceptionTest class Drupal\Tests\migrate\Unit\Exception core/modules/migrate/tests/src/Unit/Exception/RequirementsExceptionTest.php Tests Drupal\migrate\Exception\RequirementsException.
RequirementsInterface interface Drupal\migrate\Plugin core/modules/migrate/src/Plugin/RequirementsInterface.php An interface to check for a migrate plugin requirements. 5 7
RequirementsPageTrait trait Drupal\Tests core/tests/Drupal/Tests/RequirementsPageTrait.php Provides helper methods for the requirements page. 14
RequirementsTest class Drupal\Tests\system\Kernel\Module core/modules/system/tests/src/Kernel/Module/RequirementsTest.php Covers hook_requirements and hook_requirements_alter.
RequirementsTest class Drupal\Tests\file\Kernel core/modules/file/tests/src/Kernel/RequirementsTest.php Tests the file requirements.
RequirementsTest class Drupal\Tests\mysql\Functional core/modules/mysql/tests/src/Functional/RequirementsTest.php Tests isolation level warning when the config is set in settings.php.
RequirementsTrait trait Drupal\mysql core/modules/mysql/src/RequirementsTrait.php Runtime requirements trait. 2
RequiresComposerTrait trait Drupal\TestTools\Extension core/tests/Drupal/TestTools/Extension/RequiresComposerTrait.php Ensures Composer executable is available, skips test otherwise. 1

Other projects


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