Classes, traits, and interfaces - main - drupal

Primary tabs

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
EnabledConfigurablePluginsConstraintValidator class Drupal\ckeditor5\Plugin\Validation\Constraint core/modules/ckeditor5/src/Plugin/Validation/Constraint/EnabledConfigurablePluginsConstraintValidator.php Enabled configurable plugin settings validator. 1
EnabledExtensionsValidator final class Drupal\package_manager\Validator core/modules/package_manager/src/Validator/EnabledExtensionsValidator.php Validates no enabled Drupal extensions are removed from the stage directory. 1
EnabledExtensionsValidatorTest class Drupal\Tests\package_manager\Kernel core/modules/package_manager/tests/src/Kernel/EnabledExtensionsValidatorTest.php Tests Enabled Extensions Validator.
EnableLayoutBuilderTrait trait Drupal\Tests\layout_builder\Traits core/modules/layout_builder/tests/src/Traits/EnableLayoutBuilderTrait.php Test trait to enable or disable Layout Builder on an entity view display. 5
EndOfTransactionQueriesTest class Drupal\KernelTests\Core\Cache core/tests/Drupal/KernelTests/Core/Cache/EndOfTransactionQueriesTest.php Tests delaying of cache tag invalidation queries to the end of transactions.
Endpoint class Drupal\media\OEmbed core/modules/media/src/OEmbed/Endpoint.php Value object for oEmbed provider endpoints. 1
EndpointTest class Drupal\Tests\media\Unit core/modules/media/tests/src/Unit/EndpointTest.php Tests Drupal\media\OEmbed\Endpoint.
EnforcedFormResponseSubscriber class Drupal\Core\EventSubscriber core/lib/Drupal/Core/EventSubscriber/EnforcedFormResponseSubscriber.php Handle the EnforcedResponseException and deliver an EnforcedResponse. 2
EnforcedResponse class Drupal\Core\Form core/lib/Drupal/Core/Form/EnforcedResponse.php A wrapper containing a response which is to be enforced upon delivery. 1
EnforcedResponseException class Drupal\Core\Form core/lib/Drupal/Core/Form/EnforcedResponseException.php Custom exception to break out of the main request and enforce a response. 7
EngineNyanCatTest class Drupal\Tests\system\Functional\Theme core/modules/system/tests/src/Functional/Theme/EngineNyanCatTest.php Tests the multi theme engine support.
EngineTwigTest class Drupal\Tests\system\Functional\Theme core/modules/system/tests/src/Functional/Theme/EngineTwigTest.php Tests Twig-specific theme functionality.
EnhancerInterface interface Drupal\Core\Routing core/lib/Drupal/Core/Routing/EnhancerInterface.php A route enhance service to determine route enhance rules. 8 8
EnsurePHPStanVersionsMatchTest class Drupal\PHPStan\Tests core/tests/PHPStan/tests/EnsurePHPStanVersionsMatchTest.php Tests that PHPStan version used for rules testing matches core.
EnterProfileNode class Drupal\sdc_other_node_visitor\Twig\Profiler core/modules/system/tests/modules/sdc_other_node_visitor/src/Twig/Profiler/EnterProfileNode.php Represents a profile enter node. 1
Entity abstract class Drupal\migrate\Plugin\migrate\destination core/modules/migrate/src/Plugin/migrate/destination/Entity.php Provides a generic destination to import entities. 2
Entity class Drupal\views\Plugin\views\argument_validator core/modules/views/src/Plugin/views/argument_validator/Entity.php Defines an argument validator plugin for each entity type. 2 3
Entity class Drupal\views\Plugin\views\area core/modules/views/src/Plugin/views/area/Entity.php Provides an area handler which renders an entity in a certain view mode. 1
Entity class Drupal\Tests\Component\Annotation\Doctrine\Ticket core/tests/Drupal/Tests/Component/Annotation/Doctrine/Ticket/DCOM58Test.php
Entity class core/tests/Drupal/Tests/Component/Annotation/Doctrine/Ticket/DCOM58Entity.php This class is a near-copy of tests/Doctrine/Tests/Common/Annotations/Ticket/DCOM58Entity.php, which is part of the Doctrine project: <http://www.doctrine-project.org>. It was copied from version 1.2.7.
EntityAccess class Drupal\workspaces\Hook core/modules/workspaces/src/Hook/EntityAccess.php Defines a class for reacting to entity access control hooks.
EntityAccessCheck class Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityAccessCheck.php Provides a generic access checker for entities. 1 2
EntityAccessChecker class Drupal\jsonapi\Access core/modules/jsonapi/src/Access/EntityAccessChecker.php Checks access to entities. 2 2
EntityAccessCheckTest class Drupal\Tests\Core\Entity core/tests/Drupal/Tests/Core/Entity/EntityAccessCheckTest.php Unit test of entity access checking system.
EntityAccessControlHandler class Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php Defines a default implementation for entity access control handler. 35 40
EntityAccessControlHandlerInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityAccessControlHandlerInterface.php Defines an interface for entity access control handlers. 2 1
EntityAccessControlHandlerTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityAccessControlHandlerTest.php Tests the entity access control handler.
EntityAccessDeniedHttpException class Drupal\jsonapi\Exception core/modules/jsonapi/src/Exception/EntityAccessDeniedHttpException.php Enhances the access denied exception with information about the entity. 8
EntityAccessDeniedHttpExceptionNormalizer class Drupal\jsonapi\Normalizer core/modules/jsonapi/src/Normalizer/EntityAccessDeniedHttpExceptionNormalizer.php Normalizes an EntityAccessDeniedException. 2
EntityActionBase abstract class Drupal\Core\Action\Plugin\Action core/lib/Drupal/Core/Action/Plugin/Action/EntityActionBase.php Base class for entity-based actions. 4
EntityActionDeriverBase abstract class Drupal\Core\Action\Plugin\Action\Derivative core/lib/Drupal/Core/Action/Plugin/Action/Derivative/EntityActionDeriverBase.php Provides a base action for each entity type with specific interfaces. 3
EntityAdapter class Drupal\Core\Entity\Plugin\DataType core/lib/Drupal/Core/Entity/Plugin/DataType/EntityAdapter.php Defines the "entity" data type. 1 10
EntityAdapterUnitTest class Drupal\Tests\Core\Entity\TypedData core/tests/Drupal/Tests/Core/Entity/TypedData/EntityAdapterUnitTest.php Tests Drupal\Core\Entity\Plugin\DataType\EntityAdapter.
EntityAddUITest class Drupal\Tests\system\Functional\Entity core/modules/system/tests/src/Functional/Entity/EntityAddUITest.php Tests the /add and /add/{type} controllers.
EntityAliasTest class Drupal\Tests\path_alias\Kernel core/modules/path_alias/tests/src/Kernel/EntityAliasTest.php Tests path alias on entities.
EntityApiTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityApiTest.php Tests basic CRUD functionality.
EntityArgument class Drupal\views\Plugin\views\argument core/modules/views/src/Plugin/views/argument/EntityArgument.php Argument handler to accept an entity ID value. 5 5
EntityArgumentTest class Drupal\Tests\views\Functional\Plugin core/modules/views/tests/src/Functional/Plugin/EntityArgumentTest.php Tests the handler of the view: entity target argument.
EntityArgumentUpdateTest class Drupal\Tests\views\Functional\Update core/modules/views/tests/src/Functional/Update/EntityArgumentUpdateTest.php Tests the upgrade path for converting numeric arguments to entity_target_id.
EntityAutocomplete class Drupal\Core\Entity\Element core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php Provides an entity autocomplete form element. 6
EntityAutocompleteController class Drupal\system\Controller core/modules/system/src/Controller/EntityAutocompleteController.php Defines a route controller for entity autocomplete form elements. 1
EntityAutocompleteElementFormTest class Drupal\KernelTests\Core\Entity\Element core/tests/Drupal/KernelTests/Core/Entity/Element/EntityAutocompleteElementFormTest.php Tests the EntityAutocomplete Form API element.
EntityAutocompleteMatcher class Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityAutocompleteMatcher.php Matcher class to get autocompletion results for entity reference. 2
EntityAutocompleteMatcherInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityAutocompleteMatcherInterface.php Provides an interface for the entity autocomplete matcher. 1 1
EntityAutocompleteTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityAutocompleteTest.php Tests the autocomplete functionality.
EntityBase abstract class Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityBase.php Defines a base entity class. 7 10
EntityBaseFieldOverride class Drupal\migrate\Plugin\migrate\destination core/modules/migrate/src/Plugin/migrate/destination/EntityBaseFieldOverride.php Provides entity base field override destination plugin.
EntityBaseTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityBaseTest.php Tests the functionality provided by \Drupal\Core\Entity\EntityBase.
EntityBaseTest class Drupal\Tests\Core\Entity\KeyValueStore core/tests/Drupal/Tests/Core/Entity/KeyValueStore/KeyValueEntityStorageTest.php A simple entity class for testing key value entity storage.
EntityBlock class Drupal\block\Plugin\migrate\destination core/modules/block/src/Plugin/migrate/destination/EntityBlock.php Migrate destination for block entity.

Other projects


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.