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 |
|---|---|---|---|---|---|---|---|---|
| PluginDependencyTrait | trait | Drupal\Core\Plugin | core/ |
Provides a trait for calculating the dependencies of a plugin. | 5 | |||
| PluginDependencyTraitTest | class | Drupal\Tests\Core\Plugin | core/ |
Tests Drupal\Core\Plugin\PluginDependencyTrait. | ||||
| PluginEventSubscriber | class | Drupal\migrate\Plugin | core/ |
Event subscriber to forward Migrate events to source and destination plugins. | 2 | |||
| PluginExample | class | Drupal\plugin_test\Plugin\Attribute | core/ |
Defines a custom PluginExample attribute. | 6 | |||
| PluginExample | class | Drupal\plugin_test\Plugin\Annotation | core/ |
Defines a custom Plugin annotation. | 1 | |||
| PluginException | class | Drupal\Component\Plugin\Exception | core/ |
Base class for plugin exceptions. | 3 | 24 | ||
| PluginExistsConstraint | class | Drupal\Core\Plugin\Plugin\Validation\Constraint | core/ |
Checks if a plugin exists and optionally implements a particular interface. | 2 | |||
| PluginExistsConstraintTest | class | Drupal\Tests\Core\Plugin | core/ |
Tests Drupal\Core\Plugin\Plugin\Validation\Constraint\PluginExistsConstraint. | ||||
| PluginExistsConstraintValidator | class | Drupal\Core\Plugin\Plugin\Validation\Constraint | core/ |
Validates the PluginExists constraint. | 1 | |||
| PluginExistsConstraintValidatorTest | class | Drupal\KernelTests\Core\Plugin | core/ |
Tests Plugin Exists Constraint Validator. | ||||
| PluginExtended | class | Drupal\plugin_test_extended\Plugin\Annotation | core/ |
Defines a test annotation that extends an annotation in another namespace. | ||||
| PluginFormBase | abstract class | Drupal\Core\Plugin | core/ |
Provides a base class for plugin forms. | 7 | 7 | ||
| PluginFormFactory | class | Drupal\Core\Plugin | core/ |
Provides form discovery capabilities for plugins. | 1 | 2 | ||
| PluginFormFactoryInterface | interface | Drupal\Core\Plugin | core/ |
Provides an interface for retrieving form objects for plugins. | 1 | 10 | ||
| PluginFormFactoryTest | class | Drupal\Tests\Core\Plugin | core/ |
Tests Drupal\Core\Plugin\PluginFormFactory. | ||||
| PluginFormInterface | interface | Drupal\Core\Plugin | core/ |
Provides an interface for an embeddable plugin form. | 23 | 28 | ||
| PluginID | class | Drupal\Component\Annotation | core/ |
Defines a Plugin annotation object that just contains an ID. | 2 | 3 | ||
| PluginID | class | Drupal\Component\Plugin\Attribute | core/ |
Defines a Plugin attribute object that just contains an ID. | 6 | 12 | ||
| PluginIdTest | class | Drupal\Tests\Component\Annotation | core/ |
Tests Drupal\Component\Annotation\PluginID. | ||||
| PluginIdTest | class | Drupal\Tests\Component\Plugin\Attribute | core/ |
Tests Drupal\Component\Plugin\Attribute\PluginID. | ||||
| PluginInspectionInterface | interface | Drupal\Component\Plugin | core/ |
Plugin interface for providing some metadata inspection. | 32 | 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/ |
Plugin manager for testing the lazy route provider during module install. | 2 | |||
| PluginManagerBase | abstract class | Drupal\Component\Plugin | core/ |
Base class for plugin managers. | 7 | 9 | ||
| PluginManagerBaseTest | class | Drupal\Tests\Component\Plugin | core/ |
Tests Drupal\Component\Plugin\PluginManagerBase. | ||||
| 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. | 21 | 49 | ||
| 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. | 59 | |||
| PluginSettingsBase | abstract class | Drupal\Core\Field | core/ |
Base class for the Field API plugins. | 3 | 1 | ||
| PluginSettingsBaseTest | class | Drupal\Tests\Core\Field | core/ |
Tests Drupal\Core\Field\PluginSettingsBase. | ||||
| 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/ |
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 formulae. | 1 | |||
| PluralTranslatableMarkup | class | Drupal\Core\StringTranslation | core/ |
A class to hold plural translatable markup. | 17 | |||
| 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. |
Pagination
- Previous page
- Page 153
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.