Classes, traits, and interfaces - 10.3.x - drupal
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 1518
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| RecipeRunnerTest | class | Drupal\KernelTests\Core\Recipe | core/ |
@coversDefaultClass \Drupal\Core\Recipe\RecipeRunner[[api-linebreak]] @group Recipe | ||||
| RecipeTest | class | Drupal\KernelTests\Core\Recipe | core/ |
@coversDefaultClass \Drupal\Core\Recipe\Recipe[[api-linebreak]] @group Recipe | ||||
| RecipeTestTrait | trait | Drupal\FunctionalTests\Core\Recipe | core/ |
Contains helper methods for interacting with recipes in functional tests. | 10 | |||
| RecipeValidationTest | class | Drupal\KernelTests\Core\Recipe | core/ |
@group Recipe | ||||
| Rectangle | class | Drupal\Component\Utility | core/ |
Rectangle rotation algebra class. | 2 | |||
| RectangleTest | class | Drupal\Tests\Component\Utility | core/ |
@coversDefaultClass \Drupal\Component\Utility\Rectangle[[api-linebreak]] @group Image | ||||
| RecursiveContextualValidator | class | Drupal\Core\TypedData\Validation | core/ |
Defines a recursive contextual validator for Typed Data. | ||||
| RecursiveContextualValidatorTest | class | Drupal\Tests\Core\TypedData | core/ |
@coversDefaultClass \Drupal\Core\TypedData\Validation\RecursiveContextualValidator[[api-linebreak]] @group TypedData | ||||
| RecursiveContextualValidatorTest | class | Drupal\KernelTests\Core\TypedData | core/ |
@coversDefaultClass \Drupal\Core\TypedData\Validation\RecursiveContextualValidator[[api-linebreak]] @group Validation | ||||
| RecursiveExtensionFilterCallback | class | Drupal\Core\Extension\Discovery | core/ |
Filters a RecursiveDirectoryIterator to discover extensions. | 1 | |||
| RecursiveExtensionFilterIterator | in drupal:10.2.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Extension\Discovery\RecursiveExtensionFilterCallback instead. |
class | Drupal\Core\Extension\Discovery | core/ |
Filters a RecursiveDirectoryIterator to discover extensions. | 1 | ||
| RecursivePlaceholdersTest | class | Drupal\Tests\Core\Render | core/ |
|||||
| RecursiveValidator | class | Drupal\Core\TypedData\Validation | core/ |
Defines a recursive validator for Typed Data. | 3 | |||
| RecursiveValidatorFactory | class | Drupal\file\Validation | core/ |
Factory for creating a new RecursiveValidator. | 2 | |||
| RedirectAjaxTest | class | Drupal\Tests\views\FunctionalJavascript | core/ |
Tests that the redirects work with Ajax enabled views. | ||||
| RedirectBlockForm | class | Drupal\form_test\Form | core/ |
Builds a simple form that redirects on submit. | ||||
| RedirectCommand | class | Drupal\Core\Ajax | core/ |
Defines an AJAX command to set the window.location, loading that URL. | 2 | |||
| RedirectDestination | class | Drupal\Core\Routing | core/ |
Provides helpers for redirect destinations. | 1 | 2 | ||
| RedirectDestinationInterface | interface | Drupal\Core\Routing | core/ |
Provides an interface for redirect destinations. | 1 | 11 | ||
| RedirectDestinationTest | class | Drupal\Tests\Core\Routing | core/ |
@coversDefaultClass \Drupal\Core\Routing\RedirectDestination[[api-linebreak]] @group Routing | ||||
| RedirectDestinationTrait | trait | Drupal\Core\Routing | core/ |
Wrapper methods for the Redirect Destination. | 10 | |||
| RedirectFormBlock | class | Drupal\form_test\Plugin\Block | core/ |
Provides a block containing a simple redirect form. | ||||
| RedirectLeadingSlashesSubscriber | class | Drupal\Core\EventSubscriber | core/ |
Redirects paths containing successive slashes to those with single slashes. | 2 | |||
| RedirectOnExceptionTest | class | Drupal\KernelTests\RequestProcessing | core/ |
Tests redirects on exception pages. | ||||
| RedirectResponseSubscriber | class | Drupal\Core\EventSubscriber | core/ |
Allows manipulation of the response object when performing a redirect. | 4 | 2 | ||
| RedirectResponseSubscriberTest | class | Drupal\Tests\Core\EventSubscriber | core/ |
@coversDefaultClass \Drupal\Core\EventSubscriber\RedirectResponseSubscriber[[api-linebreak]] @group EventSubscriber | ||||
| RedirectTest | class | Drupal\Tests\system\Functional\Form | core/ |
Tests form redirection functionality. | ||||
| RedirectTest | class | Drupal\Tests\views_ui\Functional | core/ |
Tests the redirecting after saving a views. | ||||
| RedundantEditableConfigNamesTrait | trait | Drupal\Core\Form | core/ |
Implements ::getEditableConfigNames() for forms using #config_target. | 6 | |||
| ReEnableModuleFieldTest | class | Drupal\Tests\field\Functional | core/ |
Tests the behavior of a field module after being disabled and re-enabled. | ||||
| ReferenceAccessConstraint | class | Drupal\Core\Entity\Plugin\Validation\Constraint | core/ |
Entity Reference valid reference constraint. | ||||
| ReferenceAccessConstraintValidator | class | Drupal\Core\Entity\Plugin\Validation\Constraint | core/ |
Checks if the current user has access to newly referenced entities. | ||||
| ReferenceBase | abstract class | Drupal\migrate_drupal\Plugin\migrate\field | core/ |
Base class for Drupal reference fields. | 4 | 4 | ||
| RefinableCacheableDependencyInterface | interface | Drupal\Core\Cache | core/ |
Allows to add cacheability metadata to an object for the current runtime. | 10 | 25 | ||
| RefinableCacheableDependencyTrait | trait | Drupal\Core\Cache | core/ |
Trait for \Drupal\Core\Cache\RefinableCacheableDependencyInterface. | 9 | |||
| RefinableCalculatedPermissions | class | Drupal\Core\Session | core/ |
Represents a calculated set of permissions with cacheable metadata. | 6 | |||
| RefinableCalculatedPermissionsInterface | interface | Drupal\Core\Session | core/ |
Defines the refinable calculated permissions interface. | 1 | 2 | ||
| RefinableCalculatedPermissionsTest | class | Drupal\Tests\Core\Session | core/ |
Tests the RefinableCalculatedPermissions class. | ||||
| RefinableDependentAccessInterface | interface | Drupal\block_content\Access | core/ |
An interface to allow adding an access dependency. | 4 | 5 | ||
| RefinableDependentAccessTrait | trait | Drupal\block_content\Access | core/ |
Trait for \Drupal\block_content\Access\RefinableDependentAccessInterface. | 3 | |||
| RefinableDependentAccessTraitTestClass | class | Drupal\Tests\block_content\Unit\Access | core/ |
Test class that implements RefinableDependentAccessInterface. | ||||
| Reflection | final class | Drupal\Component\Utility | core/ |
Provides helper methods for reflection. | 3 | |||
| ReflectionFactory | class | Drupal\Component\Plugin\Factory | core/ |
A plugin factory that maps instance configuration to constructor arguments. | 1 | 2 | ||
| ReflectionFactoryTest | class | Drupal\Tests\Component\Plugin\Factory | core/ |
@group Plugin @coversDefaultClass \Drupal\Component\Plugin\Factory\ReflectionFactory[[api-linebreak]] | ||||
| ReflectionTest | class | Drupal\Tests\Component\Utility | core/ |
@coversDefaultClass \Drupal\Component\Utility\Reflection[[api-linebreak]] @group Utility | ||||
| RefreshVariablesTrait | trait | Drupal\Core\Test | core/ |
Provides a method to refresh in-memory configuration and state information. | 1 | |||
| RegexConstraint | class | Drupal\Core\Validation\Plugin\Validation\Constraint | core/ |
Regex constraint. | 1 | 2 | ||
| RegexDirectoryIterator | class | Drupal\Component\FileSystem | core/ |
Iterates over files whose names match a regular expression in a directory. | 3 | |||
| RegexDirectoryIteratorTest | class | Drupal\Tests\Component\FileSystem | core/ |
@coversDefaultClass \Drupal\Component\FileSystem\RegexDirectoryIterator[[api-linebreak]] @group FileSystem | ||||
| RegexRecursiveFilterIterator | class | Drupal\Core\Plugin\Discovery | core/ |
Iterates over files whose names match a regular expression in a directory. |
Pagination
- Previous page
- Page 144
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.