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 |
|---|---|---|---|---|---|---|---|---|
| PluginTest | class | Drupal\Tests\Component\Annotation | core/ |
Tests Drupal\Component\Annotation\Plugin. | ||||
| PluginTest | class | Drupal\Tests\Component\Plugin\Attribute | core/ |
Tests Drupal\Component\Plugin\Attribute\Plugin. | ||||
| PluginTestBase | abstract class | Drupal\KernelTests\Core\Plugin | core/ |
Base class for Plugin API unit tests. | 3 | |||
| PluginTestHooks | class | Drupal\plugin_test\Hook | core/ |
Hook implementations for plugin_test. | ||||
| PluginTypeListTest | class | Drupal\Tests\views\Unit | core/ |
Tests that list of plugin is correct. | ||||
| PluginWithFormsInterface | interface | Drupal\Core\Plugin | core/ |
Provides an interface for plugins which have forms. | 6 | 14 | ||
| PluginWithFormsTrait | trait | Drupal\Core\Plugin | core/ |
Provides a trait with typical behavior for plugins which have forms. | 5 | |||
| PluginWithFormsTraitTest | class | Drupal\Tests\Core\Plugin | core/ |
Tests Drupal\Core\Plugin\PluginWithFormsTrait. | ||||
| PluralFormula | class | Drupal\locale | core/ |
Manages the storage of plural formula per language in state. | 2 | |||
| PluralFormulaInterface | interface | Drupal\locale | core/ |
An interface for a service providing plural formulas. | 1 | |||
| PluralTranslatableMarkup | class | Drupal\Core\StringTranslation | core/ |
A class to hold plural translatable markup. | 15 | |||
| PluralTranslatableMarkupTest | class | Drupal\Tests\Core\StringTranslation | core/ |
Tests the TranslatableMarkup class. | ||||
| PluralTranslation | class | Drupal\Core\Annotation | core/ |
Defines an annotation object for strings that require plural forms. | 1 | |||
| PluralTranslationTest | class | Drupal\Tests\Core\Annotation | core/ |
Tests Drupal\Core\Annotation\PluralTranslation. | ||||
| PluralVariants | class | Drupal\config_translation\FormElement | core/ |
Defines form elements for plurals in configuration translation. | ||||
| PoDatabaseReader | class | Drupal\locale | core/ |
Gettext PO reader working with the locale module database. | 1 | |||
| PoDatabaseWriter | class | Drupal\locale | core/ |
Gettext PO writer working with the locale module database. | ||||
| PoHeader | class | Drupal\Component\Gettext | core/ |
Gettext PO header handler. | 5 | |||
| PoHeaderTest | class | Drupal\Tests\Component\Gettext | core/ |
Unit tests for the Gettext PO file header handling features. | ||||
| PoItem | class | Drupal\Component\Gettext | core/ |
PoItem handles one translation. | 18 | |||
| PoItemTest | class | Drupal\Tests\Component\Gettext | core/ |
Tests Drupal\Component\Gettext\PoItem. | ||||
| PoMemoryWriter | class | Drupal\Component\Gettext | core/ |
Defines a Gettext PO memory writer, to be used by the installer. | 1 | |||
| PoMetadataInterface | interface | Drupal\Component\Gettext | core/ |
Methods required for both reader and writer implementations. | 2 | |||
| PoReaderInterface | interface | Drupal\Component\Gettext | core/ |
Shared interface definition for all Gettext PO Readers. | 2 | 2 | ||
| PositionShimTestController | class | Drupal\position_shim_test\Controller | core/ |
The position shim test controller. | ||||
| PositionShimTestPortedJqueryTestsController | class | Drupal\position_shim_test\Controller | core/ |
Controller for the testing jQuery UI position shim. | ||||
| PostApplyEvent | final class | Drupal\package_manager\Event | core/ |
Event fired after staged changes are synced to the active directory. | 10 | |||
| PostApplySubscriber | class | Drupal\updated_module | core/ |
Writes a file after staged changes are applied to the active directory. | 2 | |||
| PostCreateEvent | final class | Drupal\package_manager\Event | core/ |
Event fired after a stage directory has been created. | 9 | |||
| PostgresqlDateSql | class | Drupal\views\Plugin\views\query | core/ |
PostgreSQL-specific date handling. | 1 | 2 | ||
| PostgresqlDateSqlTest | class | Drupal\Tests\views\Unit\Plugin\views\query | core/ |
Tests the PostgreSQL-specific date query handler. | ||||
| PostPackageEventListenerInterface | interface | Drupal\Composer\Plugin\Scaffold | composer/ |
Interface for post package event listeners. | 1 | |||
| PoStreamInterface | interface | Drupal\Component\Gettext | core/ |
Common functions for file/stream based PO readers/writers. | 2 | |||
| PoStreamReader | class | Drupal\Component\Gettext | core/ |
Implements Gettext PO stream reader. | 3 | |||
| PoStreamReaderTest | class | Drupal\Tests\Component\Gettext | core/ |
Unit tests for the Gettext PO file header handling features. | ||||
| PoStreamWriter | class | Drupal\Component\Gettext | core/ |
Defines a Gettext PO stream writer. | 2 | |||
| PoStreamWriterTest | class | Drupal\Tests\Component\Gettext | core/ |
Tests Drupal\Component\Gettext\PoStreamWriter. | ||||
| PostRequireEvent | final class | Drupal\package_manager\Event | core/ |
Event fired after packages are updated to the stage directory. | 8 | |||
| PostSaveProcess | class | Drupal\views | core/ |
Defines the post save process value object. | 5 | |||
| PostSaveProcessTest | class | Drupal\Tests\views\Unit | core/ |
Tests Drupal\views\PostSaveProcess. | ||||
| PostSaveViewInterface | interface | Drupal\views | core/ |
Provides an interface for views plugins. | 3 | 4 | ||
| PoWriterInterface | interface | Drupal\Component\Gettext | core/ |
Shared interface definition for all Gettext PO Writers. | 3 | 1 | ||
| PreApplyEvent | final class | Drupal\package_manager\Event | core/ |
Event fired before staged changes are synced to the active directory. | 43 | |||
| PrecedingConstraintAwareValidatorTrait | trait | Drupal\ckeditor5\Plugin\Validation\Constraint | core/ |
A constraint may need preceding constraints to not have been violated. | ||||
| PreconfiguredFieldUiOptionsInterface | interface | Drupal\Core\Field | core/ |
Defines an interface for exposing "preconfigured" field definitions. | 2 | 2 | ||
| PreCreateEvent | final class | Drupal\package_manager\Event | core/ |
Event fired before a stage directory is created. | 38 | |||
| PredefinedStatesWorkflowTestType | class | Drupal\workflow_type_test\Plugin\WorkflowType | core/ |
Test workflow type. | ||||
| PredefinedWorkflowTypeTest | class | Drupal\Tests\workflows\Kernel | core/ |
Test a predefined workflow based on something other than configuration. | ||||
| PreEntityImportEvent | final class | Drupal\Core\DefaultContent | core/ |
Event dispatched before an entity is created during default content import. | 1 | |||
| PreExistingConfigException | class | Drupal\Core\Config | core/ |
An exception thrown if configuration with the same name already exists. | 7 |
Pagination
- Previous page
- Page 161
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.