Classes, traits, and interfaces - main - 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 1529
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| PreRequireEvent | final class | Drupal\package_manager\Event | core/ |
Event fired before packages are updated to the stage directory. | 16 | |||
| PreventDowngradeTest | class | Drupal\Tests\system\Functional\UpdateSystem | core/ |
Tests that a site on 11.4.0 is prevented from downgrading to 12.0.0. | ||||
| PreviewAwareBlock | class | Drupal\layout_builder_test\Plugin\Block | core/ |
Defines a class for a context-aware block. | ||||
| PreviewAwarePluginInterface | interface | Drupal\Core\Plugin | core/ |
Provides an interface to support preview mode injection in plugins. | 2 | 4 | ||
| PreviewFallbackInterface | interface | Drupal\Core\Render | core/ |
Allows an element to provide a fallback representation of itself for preview. | 1 | 4 | ||
| PreviewTest | class | Drupal\Tests\views_ui\FunctionalJavascript | core/ |
Tests the UI preview functionality. | ||||
| PreviewTest | class | Drupal\Tests\views_ui\Functional | core/ |
Tests the UI preview functionality. | ||||
| PreviewToggleTrait | trait | Drupal\layout_builder\Form | core/ |
Provides a trait that provides a toggle for the content preview. | ||||
| PreWarmableInterface | interface | Drupal\Core\PreWarm | core/ |
Interface for services with prewarmable caches. | 4 | 6 | ||
| PreWarmablePluginManagerTrait | trait | Drupal\Core\Plugin | core/ |
Provides a trait for Drupal\Core\PreWarm\PreWarmableInterface. | 3 | |||
| PreWarmerTest | class | Drupal\KernelTests\Core\PreWarm | core/ |
Tests the cache prewarmer. | ||||
| PrimitiveBase | abstract class | Drupal\Core\TypedData | core/ |
Base class for primitive data types. | 5 | 5 | ||
| PrimitiveDataNormalizer | class | Drupal\serialization\Normalizer | core/ |
Converts primitive data objects to their casted values. | 2 | 2 | ||
| PrimitiveDataNormalizerTest | class | Drupal\Tests\serialization\Unit\Normalizer | core/ |
Tests Drupal\serialization\Normalizer\PrimitiveDataNormalizer. | ||||
| PrimitiveInterface | interface | Drupal\Core\TypedData | core/ |
Interface for primitive data. | 8 | 15 | ||
| PrimitiveTypeConstraint | class | Drupal\Core\Validation\Plugin\Validation\Constraint | core/ |
Supports validating all primitive types. | 2 | |||
| PrimitiveTypeConstraintValidator | class | Drupal\Core\Validation\Plugin\Validation\Constraint | core/ |
Validates the PrimitiveType constraint. | 1 | |||
| PrimitiveTypeConstraintValidatorTest | class | Drupal\Tests\Core\Validation\Plugin\Validation\Constraint | core/ |
Tests Drupal\Core\Validation\Plugin\Validation\Constraint\PrimitiveTypeConstraintValidator. | ||||
| PrivateFileOnTranslatedEntityTest | class | Drupal\Tests\file\Functional | core/ |
Uploads private files to translated node and checks access. | ||||
| PrivateKey | class | Drupal\Core | core/ |
Manages the Drupal private key. | 9 | 2 | ||
| PrivateKeyTest | class | Drupal\Tests\Core | core/ |
Tests the PrivateKey class. | ||||
| PrivateMethodUnitTestTrait | trait | Drupal\Tests\ckeditor5\Traits | core/ |
Provides methods to test protected/private methods in unit tests. | 2 | |||
| PrivateStream | class | Drupal\Core\StreamWrapper | core/ |
Drupal private (private://) stream wrapper class. | 4 | |||
| PrivateTempStore | class | Drupal\Core\TempStore | core/ |
Stores and retrieves temporary data for a given owner. | 6 | |||
| PrivateTempStoreFactory | class | Drupal\Core\TempStore | core/ |
Creates a PrivateTempStore object for a given collection. | 12 | 2 | ||
| PrivateTempStoreTest | class | Drupal\Tests\Core\TempStore | core/ |
Tests Drupal\Core\TempStore\PrivateTempStore. | ||||
| ProceduralCall | final class | Drupal\Core\Extension | core/ |
Helper class to target procedural implementations with hook order attributes. | 4 | |||
| ProceduralHookScanStop | class | Drupal\Core\Hook\Attribute | core/ |
Defines a ProceduralHookScanStop attribute object. | 3 | |||
| ProceduralHookThemeHooks | class | Drupal\procedural_hook_theme\Hook | core/ |
Confirms LegacyHook works with themes. | ||||
| ProcessedText | class | Drupal\filter\Element | core/ |
Provides a processed text render element. | ||||
| ProcessFactory | final class | Drupal\fixture_manipulator | core/ |
Process factory that always sets the COMPOSER_MIRROR_PATH_REPOS env variable. | ||||
| ProcessField | in drupal:11.3.0 and is removed from drupal:12.0.0. There is no replacement. |
class | Drupal\field\Plugin\migrate\process | core/ |
Get the value from a method call on a field plugin instance. | 1 | ||
| ProcessFieldTest | class | Drupal\Tests\field\Unit\Plugin\migrate\process | core/ |
Tests the ProcessField migrate process plugin. | ||||
| ProcessingTest | class | Drupal\Tests\system\FunctionalJavascript\Batch | core/ |
Tests Processing. | ||||
| ProcessingTest | class | Drupal\Tests\system\Functional\Batch | core/ |
Tests batch processing in form and non-form workflow. | ||||
| ProcessOutputCallback | final class | Drupal\package_manager | core/ |
A process callback for capturing output. | 3 | |||
| ProcessOutputCallbackTest | class | Drupal\Tests\package_manager\Unit | core/ |
Tests Process Output Callback. | ||||
| ProcessPluginBase | abstract class | Drupal\migrate | core/ |
The base class for all migrate process plugins. | 78 | 78 | ||
| ProcessPluginBase | class | Drupal\Tests\migrate\Unit\process | core/ |
Extends ProcessPluginBase as a non-abstract class. | ||||
| ProcessPluginBaseTest | class | Drupal\Tests\migrate\Unit\process | core/ |
Tests the base process plugin class. | ||||
| ProfileExtensionList | class | Drupal\Core\Extension | core/ |
Provides a list of installation profiles. | 9 | 2 | ||
| ProfileField | class | Drupal\user\Plugin\migrate\source | core/ |
Drupal 6/7 profile field source from database. | 2 | 3 | ||
| ProfileFieldCheckRequirementsTest | class | Drupal\Tests\user\Kernel\Migrate\d6 | core/ |
Tests check requirements for profile_field source plugin. | ||||
| ProfileFieldCheckRequirementsTest | class | Drupal\Tests\user\Kernel\Migrate\d7 | core/ |
Tests check requirements for profile_field source plugin. | ||||
| ProfileFieldOptionTranslation | class | Drupal\user\Plugin\migrate\source\d6 | core/ |
Drupal 6 i18n profile field option labels source from database. | 1 | |||
| ProfileFieldOptionTranslation | in drupal:11.3.0 and is removed from drupal:12.0.0. There is no replacement. |
class | Drupal\user\Plugin\migrate\process\d6 | core/ |
Determines the settings property and translation. | |||
| ProfileFieldOptionTranslationTest | class | Drupal\Tests\user\Kernel\Plugin\migrate\source\d6 | core/ |
Tests the field option translation source plugin. | ||||
| ProfileFieldSettings | in drupal:11.3.0 and is removed from drupal:12.0.0. There is no replacement. |
class | Drupal\user\Plugin\migrate\process | core/ |
Determines the settings for the profile field. | |||
| ProfileFieldTest | class | Drupal\Tests\user\Kernel\Plugin\migrate\source | core/ |
Tests the profile_field source plugin. | 1 | 1 | ||
| ProfileFieldTranslation | class | Drupal\config_translation\Plugin\migrate\source\d6 | core/ |
Drupal 6 i18n strings profile field source from database. | 1 |
Pagination
- Previous page
- Page 155
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.