Classes, traits, and interfaces - 9.5.x - 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 1523
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| 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. | 16 | |||
| 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/ |
|||||
| PositionShimTestPortedJqueryTestsController | class | Drupal\position_shim_test\Controller | core/ |
|||||
| 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. | 2 | |||
| PoStreamWriter | class | Drupal\Component\Gettext | core/ |
Defines a Gettext PO stream writer. | 2 | |||
| PoStreamWriterTest | class | Drupal\Tests\Component\Gettext | core/ |
@coversDefaultClass \Drupal\Component\Gettext\PoStreamWriter[[api-linebreak]] @group Gettext | ||||
| PoWriterInterface | interface | Drupal\Component\Gettext | core/ |
Shared interface definition for all Gettext PO Writers. | 3 | 1 | ||
| 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 | ||
| 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. | ||||
| PreExistingConfigException | class | Drupal\Core\Config | core/ |
An exception thrown if configuration with the same name already exists. | 7 | |||
| PrefixInfoTest | class | Drupal\Tests\mysql\Kernel\mysql | core/ |
Tests that the prefix info for a database schema is correct. | ||||
| PreloadableRouteProviderInterface | interface | Drupal\Core\Routing | core/ |
Extends the router provider interface to pre-load routes. | 3 | 2 | ||
| 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 | |||
| 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 | |||
| 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 | ||
| 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. | ||||
| 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. | 1 | 2 | ||
| PrimitiveDataNormalizerTest | class | Drupal\Tests\serialization\Unit\Normalizer | core/ |
@coversDefaultClass \Drupal\serialization\Normalizer\PrimitiveDataNormalizer[[api-linebreak]] @group serialization | ||||
| PrimitiveInterface | interface | Drupal\Core\TypedData | core/ |
Interface for primitive data. | 7 | 11 | ||
| 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/ |
@coversDefaultClass \Drupal\Core\Validation\Plugin\Validation\Constraint\PrimitiveTypeConstraintValidator[[api-linebreak]] @group validation | ||||
| 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. | 6 | 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 |
Pagination
- Previous page
- Page 132
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.