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 |
---|---|---|---|---|---|---|---|---|
PrecedingConstraintAwareValidatorTrait | trait | Drupal\ckeditor5\Plugin\Validation\Constraint | core/ |
A constraint may need preceding constraints to not have been violated. | ||||
PreCommandRunEvent | class | Composer\Plugin | vendor/ |
The pre command run event. | 2 | |||
PreCondition | final class | PHPUnit\Metadata | vendor/ |
@psalm-immutable | ||||
PreCondition | final class | PHPUnit\Framework\Attributes | vendor/ |
@psalm-immutable | 1 | |||
PreConditionCalled | final class | PHPUnit\Event\Test | vendor/ |
@psalm-immutable | ||||
PreConditionCalledSubscriber | interface | PHPUnit\Event\Test | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
PreconditionException | class | PhpTuf\ComposerStager\API\Exception | vendor/ |
This exception is thrown when an API operation has an unfulfilled precondition. | 20 | |||
PreconditionFailedHttpException | class | Symfony\Component\HttpKernel\Exception | vendor/ |
@author Ben Ramsey <ben@benramsey.com> | 1 | 3 | ||
PreConditionFinished | final class | PHPUnit\Event\Test | vendor/ |
@psalm-immutable | ||||
PreConditionFinishedSubscriber | interface | PHPUnit\Event\Test | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | ||||
PreconditionInterface | interface | PhpTuf\ComposerStager\API\Precondition\Service | vendor/ |
Defines a precondition for an API operation and how to verify it. | 24 | 3 | ||
PreconditionRequiredHttpException | class | Symfony\Component\HttpKernel\Exception | vendor/ |
@author Ben Ramsey <ben@benramsey.com> | 1 | 1 | ||
PreconfiguredFieldUiOptionsInterface | interface | Drupal\Core\Field | core/ |
Defines an interface for exposing "preconfigured" field definitions. | 1 | 1 | ||
PreCreateEvent | final class | Drupal\package_manager\Event | core/ |
Event fired before a stage directory is created. | 13 | |||
PreDec | class | PhpParser\Node\Expr | vendor/ |
|||||
PredefinedArray | class | JsonSchema\Uri\Retrievers | vendor/ |
URI retrieved based on a predefined array of schemas | ||||
PredictionException | interface | Prophecy\Exception\Prediction | vendor/ |
4 | 5 | |||
PredictionInterface | interface | Prophecy\Prediction | vendor/ |
Prediction interface. Predictions are logical test blocks, tied to `should...` keyword. | 4 | |||
PreExistingConfigException | class | Drupal\Core\Config | core/ |
An exception thrown if configuration with the same name already exists. | 5 | |||
PreFileDownloadEvent | class | Composer\Plugin | vendor/ |
The pre file download event. | 2 | |||
PrefixFloodInterface | interface | Drupal\Core\Flood | core/ |
Defines an interface for flood controllers that clear by identifier prefix. | 2 | 1 | ||
PrefixTrait | trait | Symfony\Component\Routing\Loader\Configurator\Traits | vendor/ |
@internal | 2 | |||
Preg | class | Composer\Pcre | vendor/ |
108 | ||||
PregMatchFlags | final class | Composer\Pcre\PHPStan | vendor/ |
|||||
PregMatchParameterOutTypeExtension | final class | Composer\Pcre\PHPStan | vendor/ |
|||||
PregMatchTypeSpecifyingExtension | final class | Composer\Pcre\PHPStan | vendor/ |
|||||
PregReplaceCallbackClosureTypeExtension | final class | Composer\Pcre\PHPStan | vendor/ |
|||||
PregSecuritySniff | class | Drupal\Sniffs\Semantics | vendor/ |
Check the usage of the preg functions to ensure the insecure /e flag isn't used: https://www.drupal.org/node/750148 | ||||
PreImportEvent | final class | Drupal\Core\DefaultContent | core/ |
Event dispatched before default content is imported. | ||||
PreInc | class | PhpParser\Node\Expr | vendor/ |
|||||
PreloadableRouteProviderInterface | interface | Drupal\Core\Routing | core/ |
Extends the router provider interface to pre-load routes. | 2 | 1 | ||
Preloader | final class | Symfony\Component\DependencyInjection\Dumper | vendor/ |
@author Nicolas Grekas <p@tchwork.com> | 1 | |||
PreOperationStageEvent | abstract class | Drupal\package_manager\Event | core/ |
Base class for events dispatched before a stage life cycle operation. | 4 | 20 | ||
PreparationFailed | final class | PHPUnit\Event\Test | vendor/ |
@psalm-immutable | 1 | |||
PreparationFailedSubscriber | interface | PHPUnit\Event\Test | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 1 | 1 | ||
PreparationStarted | final class | PHPUnit\Event\Test | vendor/ |
@psalm-immutable | 2 | |||
PreparationStartedSubscriber | interface | PHPUnit\Event\Test | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 1 | 1 | ||
PrepareBodyMiddleware | class | GuzzleHttp | vendor/ |
Prepares requests that contain a body, adding the Content-Length, Content-Type, and Expect headers. | ||||
Prepared | final class | PHPUnit\Event\Test | vendor/ |
@psalm-immutable | 10 | |||
PreparedSubscriber | interface | PHPUnit\Event\Test | vendor/ |
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit | 6 | 6 | ||
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. | 2 | |||
PrepareModulesEntityUninstallForm | class | Drupal\system\Form | core/ |
Provides a form removing module content entities data before uninstallation. | 1 | |||
PrependCommand | class | Drupal\Core\Ajax | core/ |
AJAX command for calling the jQuery insert() method. | 4 | |||
PrependExtensionInterface | interface | Symfony\Component\DependencyInjection\Extension | vendor/ |
2 | 2 | |||
PrePoolCreateEvent | class | Composer\Plugin | vendor/ |
The pre command run event. | 1 | |||
PreReleaseSuffix | class | PharIo\Version | vendor/ |
|||||
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. | 7 | |||
PreserveGlobalState | final class | PHPUnit\Framework\Attributes | vendor/ |
@psalm-immutable | 1 |