Classes, traits, and interfaces - 9.5.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 1523
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| 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 | 8 | ||
| 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. | 1 | 2 | ||
| RedirectResponseSubscriberTest | class | Drupal\Tests\Core\EventSubscriber | core/ |
@coversDefaultClass \Drupal\Core\EventSubscriber\RedirectResponseSubscriber[[api-linebreak]] @group EventSubscriber | ||||
| RedirectTest | class | Drupal\Tests\views_ui\Functional | core/ |
Tests the redirecting after saving a views. | ||||
| RedirectTest | class | Drupal\Tests\system\Functional\Form | core/ |
Tests form redirection functionality. | ||||
| 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. | 9 | 22 | ||
| RefinableCacheableDependencyTrait | trait | Drupal\Core\Cache | core/ |
Trait for \Drupal\Core\Cache\RefinableCacheableDependencyInterface. | 8 | |||
| 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 | |||
| ReflectionClass | trait | Drupal\Component\Annotation\Doctrine\Compatibility\Php8 | core/ |
|||||
| ReflectionClass | trait | Drupal\Component\Annotation\Doctrine\Compatibility\Php7 | core/ |
|||||
| 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. | ||||
| 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 | ||||
| RegionalForm | class | Drupal\system\Form | core/ |
Configure regional settings for this site. | 1 | |||
| RegisterAccessCheck | class | Drupal\user\Access | core/ |
Access check for user registration routes. | 2 | |||
| RegisterAccessChecksPass | class | Drupal\Core\DependencyInjection\Compiler | core/ |
Adds services tagged 'access_check' to the access_manager service. | 1 | |||
| RegisterEntityResolversCompilerPass | class | Drupal\serialization | core/ |
Adds services tagged 'entity_resolver' to the Serializer. | ||||
| RegisterEventSubscribersPass | class | Drupal\Core\DependencyInjection\Compiler | core/ |
Registers all event subscribers to the event dispatcher. | 1 | |||
| RegisterForm | class | Drupal\user | core/ |
Form handler for the user register forms. | ||||
| RegisterSerializationClassesCompilerPass | class | Drupal\serialization | core/ |
Adds services tagged 'normalizer' and 'encoder' to the Serializer. | 1 | 2 | ||
| RegisterSerializationClassesCompilerPass | class | Drupal\jsonapi\DependencyInjection\Compiler | core/ |
Adds services tagged JSON:API-only normalizers to the Serializer. | 1 | |||
| RegisterSerializationClassesCompilerPassTest | class | Drupal\Tests\serialization\Unit\CompilerPass | core/ |
@coversDefaultClass \Drupal\serialization\RegisterSerializationClassesCompilerPass[[api-linebreak]] @group serialization | ||||
| RegisterServicesForDestructionPass | class | Drupal\Core\DependencyInjection\Compiler | core/ |
Adds services with specific tags to "kernel_destruct_subscriber" service. | 1 | |||
| RegisterStreamWrappersPass | class | Drupal\Core\DependencyInjection\Compiler | core/ |
Adds services tagged 'stream_wrapper' to the stream_wrapper_manager service. | 1 | |||
| RegistrationWithUserFieldsTest | class | Drupal\Tests\user\FunctionalJavascript | core/ |
Tests user registration forms with additional fields. | ||||
| Registry | class | Drupal\Core\Theme | core/ |
Defines the theme registry service. | 10 | 2 | ||
| RegistryLegacyTest | class | Drupal\Tests\Core\Theme | core/ |
@coversDefaultClass \Drupal\Core\Theme\Registry[[api-linebreak]] @group Theme @group legacy | ||||
| RegistryLegacyTest | class | Drupal\KernelTests\Core\Theme | core/ |
Tests legacy behavior of the ThemeRegistry class. | ||||
| RegistryTest | class | Drupal\KernelTests\Core\Theme | core/ |
Tests the behavior of the ThemeRegistry class. | ||||
| RegistryTest | class | Drupal\Tests\Core\Theme | core/ |
@coversDefaultClass \Drupal\Core\Theme\Registry[[api-linebreak]] @group Theme | 1 | |||
| RegressionTest | class | Drupal\KernelTests\Core\Database | core/ |
Regression tests cases for the database layer. |
Pagination
- Previous page
- Page 137
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.