Classes, traits, and interfaces - 8.9.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 1511
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
EntityViewsDataInterface | interface | Drupal\views | core/ |
Provides an interface to integrate an entity type with views. | 2 | 1 | ||
EntityViewsDataTest | class | Drupal\Tests\views\Unit | core/ |
@coversDefaultClass \Drupal\views\EntityViewsData @group Views | ||||
EntityViewsDataUpdateFilledTest | class | Drupal\Tests\views\Functional\Update | core/ |
Runs EntityViewsDataUpdateTest with a dump filled with content. | ||||
EntityViewsDataUpdateTest | class | Drupal\Tests\views\Functional\Update | core/ |
Tests the upgrade path for views field plugins. | 1 | |||
EntityViewsMultiValueBaseFieldDataUpdateTest | class | Drupal\Tests\views\Functional\Update | core/ |
Tests the upgrade path for views multi-value base field 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 | |||
EntityWithPluginCollectionInterface | interface | Drupal\Core\Entity | core/ |
Provides an interface for an object using a plugin collection. | 10 | 13 | ||
EntityWithUriCacheTagsTestBase | in drupal:8.6.0 and is removed from drupal:9.0.0. Use \Drupal\Tests\system\Functional\Entity\EntityWithUriCacheTagsTestBase. |
abstract class | Drupal\system\Tests\Entity | core/ |
Provides helper methods for Entity cache tags tests; for entities with URIs. | |||
EntityWithUriCacheTagsTestBase | abstract class | Drupal\Tests\system\Functional\Entity | core/ |
Provides helper methods for Entity cache tags tests; for entities with URIs. | 6 | 6 | ||
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. | ||||
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. | ||||
Environment | class | Drupal\Component\Utility | core/ |
Provides PHP environment helper methods. | 20 | |||
EnvironmentCleaner | class | Drupal\Core\Test | core/ |
Helper class for cleaning test environments. | 1 | 2 | ||
EnvironmentCleanerFactory | class | Drupal\simpletest | core/ |
Test environment cleaner factory. | 2 | |||
EnvironmentCleanerInterface | interface | Drupal\Core\Test | core/ |
Defines an interface for cleaning up test results and fixtures. | 2 | 2 | ||
EnvironmentCleanerService | class | Drupal\simpletest | core/ |
Uses containerized services to perform post-test cleanup. | 2 | |||
EnvironmentCleanerTest | class | Drupal\KernelTests\Core\Test | core/ |
@coversDefaultClass \Drupal\Core\Test\EnvironmentCleaner @group Test | ||||
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 | ||||
Error | class | Drupal\Core\Utility | core/ |
Drupal error utility class. | 14 | |||
ErrorCollection | class | Drupal\jsonapi\JsonApiResource | core/ |
To be used when the primary data is `errors`. | 3 | |||
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/ |
|||||
ErrorTest | class | Drupal\Tests\Core\Utility | core/ |
@coversDefaultClass \Drupal\Core\Utility\Error @group Utility | ||||
ErrorTestController | class | Drupal\error_test\Controller | core/ |
Controller routines for error_test routes. | 1 | |||
EventBase | class | Drupal\migrate\Event | core/ |
2 | 2 | |||
EventBaseTest | class | Drupal\Tests\migrate\Unit\Event | core/ |
@coversDefaultClass \Drupal\migrate\Event\EventBase @group migrate | 2 | |||
EventSubscriber | class | Drupal\module_install_class_loader_test2 | core/ |
An event subscriber that does nothing. | 2 | |||
EventSubscriber | class | Drupal\module_install_class_loader_test1 | core/ |
An event subscriber that does different things depending on whether classes exist. | 2 | |||
EventSubscriber | class | Drupal\config_collection_install_test | core/ |
2 | ||||
EventSubscriber | class | Drupal\config_events_test | core/ |
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 | |||
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. | ||||
ExampleRenderable | class | Drupal\twig_theme_test | core/ |
Provides an example implementation of the RenderableInterface. | ||||
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 | |||
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/ |
@coversDefaultClass \Drupal\Core\EventSubscriber\ExceptionJsonSubscriber @group EventSubscriber | ||||
ExceptionLoggingSubscriber | class | Drupal\Core\EventSubscriber | core/ |
Log exceptions without further handling. | 2 | |||
ExceptionTestSiteSubscriber | class | Drupal\Core\EventSubscriber | core/ |
Custom handling of errors when in a system-under-test. | 2 | |||
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 |
Pagination
- Previous page
- Page 61
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.