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 |
|---|---|---|---|---|---|---|---|---|
| Plugin | class | Drupal\Composer\Plugin\Scaffold | composer/ |
Composer plugin for handling drupal scaffold. | ||||
| Plugin | final class | Drupal\Composer\Plugin\RecipeUnpack | composer/ |
Composer plugin for handling dependency unpacking. | ||||
| Plugin | class | Drupal\Component\Annotation | core/ |
Defines a Plugin annotation object. | 40 | 39 | ||
| Plugin | class | Drupal\Component\Plugin\Attribute | core/ |
Defines a Plugin attribute object. | 57 | 59 | ||
| PluginAlterTest | class | Drupal\KernelTests\Core\Render\Element | core/ |
Tests Plugin Alter. | ||||
| PluginAwareInterface | interface | Drupal\Component\Plugin | core/ |
Provides an interface for objects that depend on a plugin. | 4 | 6 | ||
| PluginBase | abstract class | Drupal\Core\Plugin | core/ |
Base class for plugins supporting metadata inspection and translation. | 41 | 39 | ||
| PluginBase | abstract class | Drupal\Component\Plugin | core/ |
Base class for plugins wishing to support metadata inspection. | 14 | 32 | ||
| PluginBase | abstract class | Drupal\views\Plugin\views | core/ |
Base class for any views plugin types. | 15 | 21 | ||
| PluginBaseTest | class | Drupal\Tests\views\Unit | core/ |
Tests Drupal\views\Plugin\views\PluginBase. | ||||
| PluginBaseTest | class | Drupal\Tests\views\Kernel\Plugin | core/ |
Tests the PluginBase class. | ||||
| PluginBaseTest | class | Drupal\Tests\Component\Plugin | core/ |
Tests Drupal\Component\Plugin\PluginBase. | ||||
| PluginDefinition | class | Drupal\Component\Plugin\Definition | core/ |
Provides object-based plugin definitions. | 10 | 10 | ||
| 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/ |
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 | 26 | ||
| 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. | 23 | 52 | ||
| 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. | 60 | |||
| 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/ |
Pagination
- Previous page
- Page 160
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.