Classes, traits, and interfaces - 10.3.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 1518
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| PluginID | class | Drupal\Component\Annotation | core/ |
Defines a Plugin annotation object that just contains an ID. | 2 | 4 | ||
| PluginID | class | Drupal\Component\Plugin\Attribute | core/ |
Defines a Plugin attribute object that just contains an ID. | 6 | 10 | ||
| PluginIdTest | class | Drupal\Tests\Component\Annotation | core/ |
@coversDefaultClass \Drupal\Component\Annotation\PluginId[[api-linebreak]] @group Annotation | ||||
| PluginIdTest | class | Drupal\Tests\Component\Plugin\Attribute | core/ |
@coversDefaultClass \Drupal\Component\Plugin\Attribute\PluginId[[api-linebreak]] @group Attribute | ||||
| PluginInspectionInterface | interface | Drupal\Component\Plugin | core/ |
Plugin interface for providing some metadata inspection. | 33 | 43 | ||
| PluginInstanceTest | class | Drupal\Tests\views\Kernel | core/ |
Tests that an instance of all views plugins can be created. | ||||
| PluginKernelTestBase | abstract class | Drupal\Tests\views\Kernel\Plugin | core/ |
Base test class for views plugin unit tests. | 4 | |||
| PluginManager | class | Drupal\lazy_route_provider_install_test | core/ |
2 | ||||
| PluginManagerBase | abstract class | Drupal\Component\Plugin | core/ |
Base class for plugin managers. | 6 | 10 | ||
| PluginManagerBaseTest | class | Drupal\Tests\Component\Plugin | core/ |
@coversDefaultClass \Drupal\Component\Plugin\PluginManagerBase[[api-linebreak]] @group Plugin | ||||
| PluginManagerCacheClearer | class | Drupal\module_test | core/ |
Helps test module uninstall. | 1 | 2 | ||
| PluginManagerDependentValidatorTrait | trait | Drupal\ckeditor5\Plugin\Validation\Constraint | core/ |
Common functionality for many CKEditor 5 validation constraints. | ||||
| PluginManagerInterface | interface | Drupal\Component\Plugin | core/ |
Interface implemented by plugin managers. | 20 | 47 | ||
| PluginManagerPass | class | Drupal\Core\Plugin | core/ |
Registers plugin managers to the plugin.cache_clearer service. | 1 | |||
| PluginNotFoundException | class | Drupal\Component\Plugin\Exception | core/ |
Plugin exception class to be thrown when a plugin ID could not be found. | 55 | |||
| PluginSettingsBase | abstract class | Drupal\Core\Field | core/ |
Base class for the Field API plugins. | 3 | 1 | ||
| PluginSettingsBaseTest | class | Drupal\Tests\Core\Field | core/ |
@coversDefaultClass \Drupal\Core\Field\PluginSettingsBase[[api-linebreak]] @group Field | ||||
| PluginSettingsInterface | interface | Drupal\Core\Field | core/ |
Interface definition for plugin with settings. | 3 | 3 | ||
| PluginStub | class | Drupal\Tests\Component\Annotation | core/ |
|||||
| PluginStub | class | Drupal\Tests\Component\Plugin\Attribute | core/ |
|||||
| PluginTest | class | Drupal\Tests\Component\Annotation | core/ |
@coversDefaultClass \Drupal\Component\Annotation\Plugin[[api-linebreak]] @group Annotation | ||||
| PluginTest | class | Drupal\Tests\Component\Plugin\Attribute | core/ |
@coversDefaultClass \Drupal\Component\Annotation\Plugin[[api-linebreak]] @group Attribute | ||||
| PluginTestBase | abstract class | Drupal\KernelTests\Core\Plugin | core/ |
Base class for Plugin API unit tests. | 3 | |||
| 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. | 3 | 10 | ||
| PluginWithFormsTrait | trait | Drupal\Core\Plugin | core/ |
Provides a trait with typical behavior for plugins which have forms. | 3 | |||
| PluginWithFormsTraitTest | class | Drupal\Tests\Core\Plugin | core/ |
@coversDefaultClass \Drupal\Core\Plugin\PluginWithFormsTrait[[api-linebreak]] @group Plugin | ||||
| 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 formulae. | 1 | |||
| PluralTranslatableMarkup | class | Drupal\Core\StringTranslation | core/ |
A class to hold plural translatable markup. | 19 | |||
| 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/ |
@coversDefaultClass \Drupal\Core\Annotation\PluralTranslation[[api-linebreak]] @group Annotation | ||||
| 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. | 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. | ||||
| PostgreSqlSequenceUpdateTest | class | Drupal\Tests\pgsql\Functional\Database | core/ |
Tests that any unowned sequences created previously have a table owner. | ||||
| 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 |
Pagination
- Previous page
- Page 139
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.