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 |
|---|---|---|---|---|---|---|---|---|
| PreExportEvent | final class | Drupal\Core\DefaultContent | core/ |
Event dispatched before an entity is exported as default content. | 7 | |||
| PrefetchedResult | class | Drupal\Core\Database\Statement | core/ |
Class for prefetched results of a data query language (DQL) statement. | 1 | |||
| PrefixFloodInterface | interface | Drupal\Core\Flood | core/ |
Defines an interface for flood controllers that clear by identifier prefix. | 2 | 1 | ||
| PrefixInfoTest | class | Drupal\Tests\mysqli\Kernel\mysqli | core/ |
Tests that the prefix info for a database schema is correct. | ||||
| PrefixInfoTest | class | Drupal\Tests\mysql\Kernel\mysql | core/ |
Tests that the prefix info for a database schema is correct. | 1 | 1 | ||
| PreImportEvent | final class | Drupal\Core\DefaultContent | core/ |
Event dispatched before default content is imported. | 1 | |||
| PreloadableRouteProviderInterface | interface | Drupal\Core\Routing | core/ |
Extends the router provider interface to pre-load routes. | 3 | 3 | ||
| PrepareCallbackTestForm | class | Drupal\Tests\Core\Form | core/ |
A test form used for the prepareCallback() tests. | ||||
| PrepareLayout | class | Drupal\layout_builder\EventSubscriber | core/ |
An event subscriber to prepare section storage. | 2 | |||
| PrepareLayoutEvent | class | Drupal\layout_builder\Event | core/ |
Event fired in #pre_render of \Drupal\layout_builder\Element\LayoutBuilder. | 3 | |||
| PrepareModulesEntityUninstallForm | class | Drupal\system\Form | core/ |
Provides a form removing module content entities data before uninstallation. | 1 | |||
| PrepareModulesEntityUninstallFormTest | class | Drupal\Tests\system\Kernel\Module | core/ |
Tests PrepareModulesEntityUninstallForm. | ||||
| PrepareUninstallTest | class | Drupal\Tests\system\Functional\Module | core/ |
Tests that modules which provide entity types can be uninstalled. | ||||
| PrependCommand | class | Drupal\Core\Ajax | core/ |
AJAX command for calling the jQuery insert() method. | 6 | |||
| PreprocessHooks | final class | Drupal\admin\Hook | core/ |
Provides preprocess implementations. | ||||
| PreprocessHooks | final class | Drupal\default_admin\Hook | core/ |
Provides preprocess implementations. | 3 | |||
| PreprocessPagerTest | class | Drupal\Tests\system\Unit\Pager | core/ |
Tests pager preprocessing. | ||||
| PrerenderList | abstract class | Drupal\views\Plugin\views\field | core/ |
Field handler to provide a list of items. | 3 | 3 | ||
| PreRequireEvent | final class | Drupal\package_manager\Event | core/ |
Event fired before packages are updated to the stage directory. | 17 | |||
| 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. | ||||
| PrimaryKey | final class | Drupal\Core\Database\SchemaDefinition | core/ |
Describes a table's primary key. | 13 | |||
| PrimitiveBase | abstract class | Drupal\Core\TypedData | core/ |
Base class for primitive data types. | 6 | 6 | ||
| 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. | ||||
| ProceduralApiDeprecationTest | class | Drupal\Tests\Core\Render\Element | core/ |
Tests the deprecation of global rendering functions. | ||||
| 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. |
Pagination
- Previous page
- Page 162
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.