Classes, traits, and interfaces - Drupal 11.1.x - Drupal Core
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 1518
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
PreserveGlobalState | final class | PHPUnit\Metadata | vendor/ |
@psalm-immutable | 1 | |||
PrestashopInstaller | class | Composer\Installers | vendor/ |
|||||
PrettyPrint | class | Peast\Formatter | vendor/ |
Pretty print formatter. | ||||
PrettyPrinter | interface | PhpParser | vendor/ |
1 | ||||
PrettyPrinterAbstract | abstract class | PhpParser | vendor/ |
1 | 1 | |||
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 | 2 | ||
PreviewToggleTrait | trait | Drupal\layout_builder\Form | core/ |
Provides a trait that provides a toggle for the content preview. | ||||
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 | |||
PrimitiveInterface | interface | Drupal\Core\TypedData | core/ |
Interface for primitive data. | 8 | 12 | ||
PrimitiveTypeConstraint | class | Drupal\Core\Validation\Plugin\Validation\Constraint | core/ |
Supports validating all primitive types. | 1 | |||
PrimitiveTypeConstraintValidator | class | Drupal\Core\Validation\Plugin\Validation\Constraint | core/ |
Validates the PrimitiveType constraint. | ||||
PrintableNewAnonClassNode | class | PhpParser\Internal | vendor/ |
This node is used internally by the format-preserving pretty printer to print anonymous classes. | 1 | |||
PrintedUnexpectedOutput | final class | PHPUnit\Event\Test | vendor/ |
@psalm-immutable | 1 | |||
PrintedUnexpectedOutputSubscriber | interface | PHPUnit\Event\Test | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 1 | 1 | ||
Printer | final class | PHPStan\PhpDocParser\Printer | vendor/ |
Inspired by https://github.com/nikic/PHP-Parser/tree/36a6dcd04e7b0285e8f0868f44bd4927802f7df1 | 1 | |||
Printer | interface | PHPUnit\TextUI\Output | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 2 | 8 | ||
PrintNode | class | Twig\Node | vendor/ |
Represents a node that outputs an expression. | 10 | |||
Print_ | class | PhpParser\Node\Expr | vendor/ |
|||||
PriorityTaggedServiceTrait | trait | Symfony\Component\DependencyInjection\Compiler | vendor/ |
Trait that allows a generic method to find and sort service by priority option in the tag. | 4 | |||
PriorityTaggedServiceUtil | class | Symfony\Component\DependencyInjection\Compiler | vendor/ |
@internal | ||||
PrivateIdentifier | class | Peast\Syntax\Node | vendor/ |
A node that represents a private identifier. | ||||
PrivateKey | class | Drupal\Core | core/ |
Manages the Drupal private key. | 5 | |||
PrivateStream | class | Drupal\Core\StreamWrapper | core/ |
Drupal private (private://) stream wrapper class. | 3 | |||
PrivateTempStore | class | Drupal\Core\TempStore | core/ |
Stores and retrieves temporary data for a given owner. | 3 | |||
PrivateTempStoreFactory | class | Drupal\Core\TempStore | core/ |
Creates a PrivateTempStore object for a given collection. | 12 | |||
Problem | class | Composer\DependencyResolver | vendor/ |
Represents a problem detected while solving dependencies | ||||
ProblemNormalizer | class | Symfony\Component\Serializer\Normalizer | vendor/ |
Normalizes errors according to the API Problem spec (RFC 7807). | 1 | |||
ProblemNormalizerContextBuilder | final class | Symfony\Component\Serializer\Context\Normalizer | vendor/ |
A helper providing autocompletion for available ProblemNormalizer options. | ||||
ProceduralCall | final class | Drupal\Core\Extension | core/ |
Calls procedural hook implementations for backwards compatibility. | 1 | |||
Process | final class | PhpTuf\ComposerStager\Internal\Process\Service | vendor/ |
@package Process | 1 | 2 | ||
Process | class | Composer\XdebugHandler | vendor/ |
Process utility functions | ||||
Process | final class | OpenTelemetry\SDK\Resource\Detectors | vendor/ |
|||||
Process | class | Symfony\Component\Process | vendor/ |
Process is a thin wrapper around proc_* functions to easily start independent PHP processes. | 2 | 24 | ||
ProcessControlExtensionNotLoadedException | final class | SebastianBergmann\Invoker | vendor/ |
|||||
ProcessedCodeCoverageData | final class | SebastianBergmann\CodeCoverage\Data | vendor/ |
@internal This class is not covered by the backward compatibility promise for phpunit/php-code-coverage | 2 | |||
ProcessedText | class | Drupal\filter\Element | core/ |
Provides a processed text render element. | ||||
ProcessExecutor | class | Composer\Util | vendor/ |
@author Robert Schönthal <seroscho@googlemail.com> @author Jordi Boggiano <j.boggiano@seld.be> | 39 | |||
ProcessFactory | final class | Drupal\package_manager | core/ |
Defines a process factory which sets the COMPOSER_HOME environment variable. | ||||
ProcessFactory | final class | PhpTuf\ComposerStager\Internal\Process\Factory | vendor/ |
@package Process | 2 | |||
ProcessFactoryInterface | interface | PhpTuf\ComposerStager\API\Process\Factory | vendor/ |
Creates process objects. | 2 | 5 | 1 | |
ProcessFailedException | class | Symfony\Component\Process\Exception | vendor/ |
Exception for failed processes. | 1 | 5 | ||
ProcessField | class | Drupal\field\Plugin\migrate\process | core/ |
Get the value from a method call on a field plugin instance. | ||||
ProcessHelper | class | Symfony\Component\Console\Helper | vendor/ |
The ProcessHelper class provides helpers to run external processes. | 1 | |||
ProcessInterface | interface | PhpTuf\ComposerStager\API\Process\Service | vendor/ |
Builds and runs shell commands. | 1 | 34 | ||
ProcessIsolationException | final class | PHPUnit\Framework | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
ProcessOutputCallback | final class | Drupal\package_manager | core/ |
A process callback for capturing output. | ||||
ProcessPluginBase | abstract class | Drupal\migrate | core/ |
The base class for all migrate process plugins. | 72 | 72 | ||
ProcessRuntime | final class | OpenTelemetry\SDK\Resource\Detectors | vendor/ |