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 |
|---|---|---|---|---|---|---|---|---|
| EntityViewModeXmlCookieTest | class | Drupal\FunctionalTests\Rest | core/ |
Tests Entity View Mode Xml Cookie. | ||||
| EntityViewsData | class | Drupal\views | core/ |
Provides generic views integration for entities. | 8 | 25 | ||
| EntityViewsDataInterface | interface | Drupal\views | core/ |
Provides an interface to integrate an entity type with views. | 2 | 1 | ||
| EntityViewsDataTest | class | Drupal\Tests\views\Kernel\Entity | core/ |
Tests entity views data. | ||||
| EntityViewsWithMultivalueBaseFieldTest | class | Drupal\Tests\views\Kernel\Entity | core/ |
Tests entity views with multivalue base fields. | ||||
| EntityViewTrait | trait | Drupal\Tests | core/ |
Provides helper methods to deal with building entity views in tests. | 5 | |||
| EntityWithoutBaseTableTest | class | Drupal\Tests\views\Kernel | core/ |
Tests field views data in an edge case scenario. | ||||
| EntityWithPluginCollectionInterface | interface | Drupal\Core\Entity | core/ |
Provides an interface for an object using a plugin collection. | 10 | 14 | ||
| EntityWithUriCacheTagsTestBase | abstract class | Drupal\Tests\system\Functional\Entity | core/ |
Provides helper methods for Entity cache tags tests; for entities with URIs. | 5 | 5 | ||
| EntityWorkspaceConflictConstraint | class | Drupal\workspaces\Plugin\Validation\Constraint | core/ |
Validation constraint for an entity being edited in multiple workspaces. | 1 | |||
| EntityWorkspaceConflictConstraintValidator | class | Drupal\workspaces\Plugin\Validation\Constraint | core/ |
Validates the EntityWorkspaceConflict constraint. | 1 | |||
| EntityWorkspaceConflictConstraintValidatorTest | class | Drupal\Tests\workspaces\Kernel | core/ |
Tests Drupal\workspaces\Plugin\Validation\Constraint\EntityWorkspaceConflictConstraintValidator. | ||||
| EntryPoint | class | Drupal\jsonapi\Controller | core/ |
Controller for the API entry point. | 1 | |||
| EntryPointTest | class | Drupal\Tests\jsonapi\Functional | core/ |
Makes assertions about the JSON:API behavior for internal entities. | ||||
| Enum | final class | Drupal\Component\Annotation\Doctrine\Annotation | core/ |
Annotation that can be used to signal to the parser to check the available values during the parsing process. | 1 | |||
| Environment | class | Drupal\Component\Utility | core/ |
Provides PHP environment helper methods. | 16 | |||
| EnvironmentCleaner | class | Drupal\Core\Test | core/ |
Helper class for cleaning test environments. | 1 | |||
| EnvironmentCleanerInterface | interface | Drupal\Core\Test | core/ |
Defines an interface for cleaning up test results and fixtures. | 1 | |||
| EnvironmentCleanerTest | class | Drupal\KernelTests\Core\Test | core/ |
Tests Drupal\Core\Test\EnvironmentCleaner. | ||||
| EnvironmentSupportValidator | final class | Drupal\package_manager\Validator | core/ |
Checks that the environment has support for Package Manager. | 1 | |||
| EnvironmentSupportValidatorTest | class | Drupal\Tests\package_manager\Kernel | core/ |
Tests Environment Support Validator. | ||||
| EnvironmentTest | class | Drupal\Tests\Component\Utility | core/ |
Test PHP Environment helper methods. | ||||
| Equality | class | Drupal\views\Plugin\views\filter | core/ |
Simple filter to handle equal to / not equal to filters. | ||||
| EquivalentUpdate | final class | Drupal\Core\Update | core/ |
Value object to hold information about an equivalent update. | 3 | |||
| EquivalentUpdateTest | class | Drupal\Tests\system\Functional\UpdateSystem | core/ |
Tests that update hooks are properly run. | ||||
| Error | class | Drupal\Core\Utility | core/ |
Drupal error utility class. | 32 | |||
| ErrorCollection | class | Drupal\jsonapi\JsonApiResource | core/ |
To be used when the primary data is `errors`. | 4 | |||
| ErrorContainer | class | Drupal\FunctionalTests\Bootstrap | core/ |
Container base class which triggers an error. | ||||
| ErrorHandlerTest | class | Drupal\Tests\system\Functional\System | core/ |
Performs tests on the Drupal error and exception handler. | ||||
| ErrorServiceTestServiceProvider | class | Drupal\error_service_test | core/ |
The service provider for testing bedlam in container rebuilds. | ||||
| ErrorTest | class | Drupal\Tests\Core\Utility | core/ |
Tests Drupal\Core\Utility\Error. | ||||
| ErrorTestController | class | Drupal\error_test\Controller | core/ |
Controller routines for error_test routes. | ||||
| Event | class | Drupal\Component\EventDispatcher | core/ |
Provides a forward-compatibility layer for the Symfony 5 event class. | 31 | 34 | ||
| EventBase | class | Drupal\migrate\Event | core/ |
Base class for migration events. | 2 | 2 | ||
| EventBaseTest | class | Drupal\Tests\migrate\Unit\Event | core/ |
Tests Drupal\migrate\Event\EventBase. | 2 | |||
| EventException | class | Drupal\Core\Database\Exception | core/ |
Exception thrown by the database event API. | 2 | |||
| EventLogSubscriber | final class | Drupal\package_manager_test_event_logger\EventSubscriber | core/ |
Defines an event subscriber to test logging during events in Package Manager. | 1 | 2 | ||
| EventSubscriber | class | Drupal\config_collection_install_test | core/ |
Event subscriber for testing configuration collection. | 2 | |||
| EventSubscriber | class | Drupal\config_events_test | core/ |
Event subscriber for testing configuration events. | 2 | |||
| EventSubscriber | class | Drupal\config_transformer_test | core/ |
Class EventSubscriber. | 2 | |||
| EventSubscriber | class | Drupal\config_import_test | core/ |
Config import subscriber for config import events. | 2 | |||
| EventSubscriber | class | Drupal\language_events_test | core/ |
Event subscriber for testing Language events. | 2 | |||
| EventSubscriber | class | Drupal\module_install_class_loader_test1 | core/ |
Defines an event subscriber that conditionally unsets the event list. | 2 | |||
| EventSubscriber | class | Drupal\module_install_class_loader_test2 | core/ |
An event subscriber that does nothing. | 2 | |||
| EventWithPackageListTrait | trait | Drupal\package_manager\Event | core/ |
Common methods for pre- and post-require events. | 1 | |||
| EventWithPackageListTraitTest | class | Drupal\Tests\package_manager\Unit | core/ |
Tests Event With Package List Trait. | ||||
| Example1 | class | Drupal\plugin_test\Plugin\plugin_test\custom_annotation | core/ |
Provides a test plugin with a custom annotation. | ||||
| Example2 | class | Drupal\plugin_test\Plugin\plugin_test\custom_annotation | core/ |
Provides a test plugin with a custom annotation. | ||||
| Example3 | class | Drupal\plugin_test\Plugin\plugin_test\custom_annotation | core/ |
Provides a test plugin with a custom attribute. | ||||
| Example4 | class | Drupal\plugin_test\Plugin\plugin_test\custom_annotation | core/ |
Provides a test plugin with a custom attribute. |
Pagination
- Previous page
- Page 70
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.