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 |
|---|---|---|---|---|---|---|---|---|
| Example5 | class | Drupal\plugin_test\Plugin\plugin_test\custom_annotation | core/ |
Provides a test plugin with a custom attribute. | ||||
| ExampleAttribute | final class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures\ExtraAttributes | core/ |
#[\Attribute] | 2 | |||
| ExampleParentAttribute | class | Drupal\Tests\Component\Annotation\Doctrine\Fixtures\ExtraAttributes | core/ |
#[\Attribute] | 1 | |||
| ExampleRenderable | class | Drupal\twig_theme_test | core/ |
Provides an example implementation of the RenderableInterface. | ||||
| ExampleWithAttributeAndAnnotation | class | Drupal\plugin_test\Plugin\plugin_test\custom_annotation | core/ |
Provides a test plugin with an annotation and attribute. | ||||
| ExampleWithOtherModuleDependency | class | Drupal\plugin_test\Plugin\plugin_test\custom_annotation | core/ |
Test class with a dependency on another module. | ||||
| ExceptionContainer | class | Drupal\FunctionalTests\Bootstrap | core/ |
Base container which throws an exception. | ||||
| ExceptionDetectNeedsInstallSubscriber | class | Drupal\Core\EventSubscriber | core/ |
Exception handler to determine if an exception indicates an uninstalled site. | 2 | |||
| ExceptionHandler | class | Drupal\Core\Database | core/ |
Base Database exception handler class. | 2 | 6 | ||
| ExceptionHandler | class | Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses | core/ |
CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\ExceptionHandler. | ||||
| ExceptionHandler | class | Drupal\mysqli\Driver\Database\mysqli | core/ |
MySQLi database exception handler class. | ||||
| ExceptionHandler | class | Drupal\mysql\Driver\Database\mysql | core/ |
MySql database exception handler class. | 1 | 1 | ||
| ExceptionHandlingTest | class | Drupal\KernelTests\Core\Routing | core/ |
Tests the exception handling for various cases. | ||||
| ExceptionInterface | interface | Drupal\Component\Plugin\Exception | core/ |
Exception interface for all exceptions thrown by the Plugin component. | 5 | 2 | ||
| ExceptionJsonSubscriber | class | Drupal\Core\EventSubscriber | core/ |
Default handling for JSON errors. | 1 | 2 | ||
| ExceptionJsonSubscriberTest | class | Drupal\Tests\Core\EventSubscriber | core/ |
Tests Drupal\Core\EventSubscriber\ExceptionJsonSubscriber. | ||||
| ExceptionLoggingSubscriber | class | Drupal\Core\EventSubscriber | core/ |
Log exceptions without further handling. | 2 | |||
| ExceptionLoggingSubscriberTest | class | Drupal\KernelTests\Core\EventSubscriber | core/ |
Tests that HTTP exceptions are logged correctly. | ||||
| ExcludedFieldTokenTest | class | Drupal\Tests\rest\Functional\Views | core/ |
Tests the display of an excluded field that is used as a token. | ||||
| ExcludedModulesEventSubscriber | final class | Drupal\Core\EventSubscriber | core/ |
The event subscriber preventing excluded modules to be exported. | 2 | |||
| ExcludedModulesEventSubscriberTest | class | Drupal\KernelTests\Core\Config | core/ |
Tests ExcludedModulesEventSubscriber. | ||||
| ExecTrait | trait | Drupal\Tests\Composer\Plugin | core/ |
Convenience class for creating fixtures. | 5 | |||
| ExecutableException | class | Drupal\Core\Executable | core/ |
Generic executable plugin exception class. | 1 | |||
| ExecutableFinder | final class | Drupal\package_manager | core/ |
An executable finder which looks for executable paths in configuration. | 2 | |||
| ExecutableFinderTest | class | Drupal\Tests\package_manager\Unit | core/ |
Tests Package Manager's executable finder service. | ||||
| ExecutableInterface | interface | Drupal\Core\Executable | core/ |
An interface for executable plugins. | 3 | 3 | ||
| ExecutableManagerInterface | interface | Drupal\Core\Executable | core/ |
An interface for managers of executable plugins. | 1 | 6 | ||
| ExecutablePluginBase | abstract class | Drupal\Core\Executable | core/ |
Provides the basic architecture for executable plugins. | 1 | 1 | ||
| ExecuteMigration | class | Drupal\migrate_no_migrate_drupal_test\Controller | core/ |
Custom controller to execute the test migrations. | ||||
| ExecutionContext | class | Drupal\Core\Validation | core/ |
Defines an execution context class. | 2 | |||
| ExecutionContextFactory | class | Drupal\Core\Validation | core/ |
Defines an execution factory for the Symfony validator. | 3 | |||
| ExistingDrupal8StyleDatabaseConnectionInSettingsPhpTest | class | Drupal\FunctionalTests | core/ |
Tests Existing Drupal8Style Database Connection In Settings Php. | ||||
| ExpectDeprecationTest | class | Drupal\Tests | core/ |
Ensures test coverage for deprecation testing. | ||||
| ExpectDeprecationTrait | in drupal:11.4.0 and is removed from drupal:12.0.0. Use $this->expectUserDeprecationMessage() or $this->expectUserDeprecationMessageMatches() instead. |
trait | Drupal\TestTools\Extension\DeprecationBridge | core/ |
A trait to include in Drupal tests to manage expected deprecations. | 1 | ||
| ExperimentalHelpTest | class | Drupal\Tests\help\Functional | core/ |
Verifies help for experimental modules. | ||||
| ExperimentalModuleRequirementsTestHooks | class | Drupal\experimental_module_requirements_test\Hook | core/ |
Hook implementations for experimental_module_requirements_test. | ||||
| ExperimentalModuleRequirementsTestRequirements | class | Drupal\experimental_module_requirements_test\Install\Requirements | core/ |
Install time requirements for the Experimental Requirements Test module. | ||||
| ExperimentalModuleTestHooks | class | Drupal\experimental_module_test\Hook | core/ |
Hook implementations for experimental_module_test. | ||||
| ExperimentalThemeTest | class | Drupal\Tests\system\Functional\Theme | core/ |
Tests the installation of experimental themes. | ||||
| Explode | class | Drupal\migrate\Plugin\migrate\process | core/ |
Splits the source string into an array of strings, using a delimiter. | 1 | |||
| ExplodeTest | class | Drupal\Tests\migrate\Unit\process | core/ |
Tests the Explode process plugin. | ||||
| Exporter | final class | Drupal\Core\DefaultContent | core/ |
Handles exporting content entities. | 2 | |||
| ExportForm | class | Drupal\locale\Form | core/ |
Form for the Gettext translation files export form. | 1 | |||
| ExportMetadata | final class | Drupal\Core\DefaultContent | core/ |
Collects metadata about an entity being exported. | 2 | |||
| ExportResult | final class | Drupal\Core\DefaultContent | core/ |
The result of exporting a content entity. | ||||
| ExportStorageManager | final class | Drupal\Core\Config | core/ |
The export storage manager dispatches an event for the export storage. | 1 | 2 | ||
| ExportStorageManagerTest | class | Drupal\KernelTests\Core\Config | core/ |
Tests the export storage manager. | ||||
| ExposedFilterAJAXTest | class | Drupal\Tests\views\FunctionalJavascript | core/ |
Tests the basic AJAX functionality of Views exposed forms. | ||||
| ExposedFormCache | class | Drupal\views | core/ |
Caches exposed forms, as they are heavy to generate. | 1 | 2 | ||
| ExposedFormCheckboxesTest | class | Drupal\Tests\views\Functional\Plugin | core/ |
Tests exposed forms functionality. |
Pagination
- Previous page
- Page 71
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.