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 |
|---|---|---|---|---|---|---|---|---|
| PluginBase | abstract class | Drupal\Core\Plugin | core/ |
Base class for plugins supporting metadata inspection and translation. | 49 | 48 | ||
| PluginBase | abstract class | Drupal\Component\Plugin | core/ |
Base class for plugins wishing to support metadata inspection. | 18 | 26 | ||
| PluginBase | abstract class | Drupal\views\Plugin\views | core/ |
Base class for any views plugin types. | 15 | 20 | ||
| PluginBaseTest | class | Drupal\Tests\views\Unit | core/ |
@coversDefaultClass \Drupal\views\Plugin\views\PluginBase[[api-linebreak]] @group views | ||||
| PluginBaseTest | class | Drupal\Tests\views\Kernel\Plugin | core/ |
Tests the PluginBase class. | ||||
| PluginBaseTest | class | Drupal\Tests\Component\Plugin | core/ |
@coversDefaultClass \Drupal\Component\Plugin\PluginBase[[api-linebreak]] @group Plugin | ||||
| PluginDefinition | class | Drupal\Component\Plugin\Definition | core/ |
Provides object-based plugin definitions. | 9 | 9 | ||
| PluginDefinitionInterface | interface | Drupal\Component\Plugin\Definition | core/ |
Defines a plugin definition. | 6 | 8 | ||
| PluginDependencyTrait | trait | Drupal\Core\Plugin | core/ |
Provides a trait for calculating the dependencies of a plugin. | 5 | |||
| PluginDependencyTraitTest | class | Drupal\Tests\Core\Plugin | core/ |
@coversDefaultClass \Drupal\Core\Plugin\PluginDependencyTrait[[api-linebreak]] @group Plugin | ||||
| PluginEventSubscriber | class | Drupal\migrate\Plugin | core/ |
Event subscriber to forward Migrate events to source and destination plugins. | 2 | |||
| PluginExample | class | Drupal\plugin_test\Plugin\Annotation | core/ |
Defines a custom Plugin annotation. | ||||
| PluginException | class | Drupal\Component\Plugin\Exception | core/ |
Base class for plugin exceptions. | 3 | 23 | ||
| 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. | 4 | 4 | ||
| 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 | 9 | ||
| PluginFormFactoryTest | class | Drupal\Tests\Core\Plugin | core/ |
@coversDefaultClass \Drupal\Core\Plugin\PluginFormFactory[[api-linebreak]] @group Plugin | ||||
| PluginFormInterface | interface | Drupal\Core\Plugin | core/ |
Provides an interface for an embeddable plugin form. | 22 | 29 | ||
| PluginHelper | class | Drupal\Component\Plugin | core/ |
A helper class to determine if a plugin is configurable. | 3 | |||
| PluginID | class | Drupal\Component\Annotation | core/ |
Defines a Plugin annotation object that just contains an ID. | 2 | 4 | ||
| PluginIdTest | class | Drupal\Tests\Component\Annotation | core/ |
@coversDefaultClass \Drupal\Component\Annotation\PluginId[[api-linebreak]] @group Annotation | ||||
| PluginInspectionInterface | interface | Drupal\Component\Plugin | core/ |
Plugin interface for providing some metadata inspection. | 35 | 44 | ||
| 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. | 3 | |||
| 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. | 19 | 43 | ||
| 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. | 45 | |||
| 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/ |
|||||
| PluginTest | class | Drupal\Tests\Component\Annotation | core/ |
@coversDefaultClass \Drupal\Component\Annotation\Plugin[[api-linebreak]] @group Annotation | ||||
| 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. | 11 | |||
| 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. |
Pagination
- Previous page
- Page 131
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.