Classes, traits, and interfaces - Drupal 11.1.x - Drupal Core
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 1518
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
Entity | abstract class | Drupal\migrate\Plugin\migrate\destination | core/ |
Provides a generic destination to import entities. | 2 | |||
Entity | class | Drupal\views\Plugin\views\argument_validator | core/ |
Defines an argument validator plugin for each entity type. | 2 | 2 | ||
Entity | class | Drupal\views\Plugin\views\area | core/ |
Provides an area handler which renders an entity in a certain view mode. | ||||
EntityAccess | class | Drupal\workspaces | core/ |
Service wrapper for hooks relating to entity access control. | 1 | |||
EntityAccessCheck | class | Drupal\Core\Entity | core/ |
Provides a generic access checker for entities. | ||||
EntityAccessChecker | class | Drupal\jsonapi\Access | core/ |
Checks access to entities. | 2 | 2 | ||
EntityAccessControlHandler | class | Drupal\Core\Entity | core/ |
Defines a default implementation for entity access control handler. | 32 | 32 | ||
EntityAccessControlHandlerInterface | interface | Drupal\Core\Entity | core/ |
Defines an interface for entity access control handlers. | 2 | 2 | ||
EntityAccessControlHandlerReturnTypeExtension | final class | mglaman\PHPStanDrupal\Type | vendor/ |
|||||
EntityAccessDeniedHttpException | class | Drupal\jsonapi\Exception | core/ |
Enhances the access denied exception with information about the entity. | 8 | |||
EntityAccessDeniedHttpExceptionNormalizer | class | Drupal\jsonapi\Normalizer | core/ |
Normalizes an EntityAccessDeniedException. | 2 | |||
EntityActionBase | abstract class | Drupal\Core\Action\Plugin\Action | core/ |
Base class for entity-based actions. | 4 | |||
EntityActionDeriverBase | abstract class | Drupal\Core\Action\Plugin\Action\Derivative | core/ |
Provides a base action for each entity type with specific interfaces. | 3 | |||
EntityAdapter | class | Drupal\Core\Entity\Plugin\DataType | core/ |
Defines the "entity" data type. | 1 | 6 | ||
EntityArgument | class | Drupal\views\Plugin\views\argument | core/ |
Argument handler to accept an entity ID value. | 5 | 5 | ||
EntityAutocomplete | class | Drupal\Core\Entity\Element | core/ |
Provides an entity autocomplete form element. | 5 | |||
EntityAutocompleteController | class | Drupal\system\Controller | core/ |
Defines a route controller for entity autocomplete form elements. | ||||
EntityAutocompleteMatcher | class | Drupal\Core\Entity | core/ |
Matcher class to get autocompletion results for entity reference. | ||||
EntityAutocompleteMatcherInterface | interface | Drupal\Core\Entity | core/ |
1 | 1 | |||
EntityBase | abstract class | Drupal\Core\Entity | core/ |
Defines a base entity class. | 2 | 1 | ||
EntityBaseFieldOverride | class | Drupal\migrate\Plugin\migrate\destination | core/ |
Provides entity base field override destination plugin. | ||||
EntityBlock | class | Drupal\block\Plugin\migrate\destination | core/ |
Migrate destination for block entity. | ||||
EntityBundle | class | Drupal\Core\Entity\Plugin\Condition | core/ |
Provides the 'Entity Bundle' condition. | ||||
EntityBundle | class | Drupal\Core\Entity\Plugin\Condition\Deriver | core/ |
Deriver that creates a condition for each entity type with bundles. | 1 | |||
EntityBundleExistsConstraint | class | Drupal\Core\Validation\Plugin\Validation\Constraint | core/ |
Checks if a bundle exists on a certain content entity type. | ||||
EntityBundleExistsConstraintValidator | class | Drupal\Core\Validation\Plugin\Validation\Constraint | core/ |
Validates that a bundle exists on a certain content entity type. | ||||
EntityBundleListener | class | Drupal\Core\Entity | core/ |
Reacts to entity bundle CRUD on behalf of the Entity system. | ||||
EntityBundleListenerInterface | interface | Drupal\Core\Entity | core/ |
An interface for reacting to entity bundle creation and deletion. | 2 | 1 | ||
EntityBundleRouteEnhancer | class | Drupal\Core\Entity\Enhancer | core/ |
Sets the bundle parameter for routes with the _field_ui option. | ||||
EntityChangedActionDeriver | class | Drupal\Core\Action\Plugin\Action\Derivative | core/ |
Provides an action deriver that finds entity types of EntityChangedInterface. | 1 | |||
EntityChangedConstraint | class | Drupal\Core\Entity\Plugin\Validation\Constraint | core/ |
Validation constraint for the entity changed timestamp. | 1 | 1 | ||
EntityChangedConstraintValidator | class | Drupal\Core\Entity\Plugin\Validation\Constraint | core/ |
Validates the EntityChanged constraint. | 1 | 1 | ||
EntityChangedInterface | interface | Drupal\Core\Entity | core/ |
Defines an interface for entity change timestamp tracking. | 10 | 15 | ||
EntityChangedTrait | trait | Drupal\Core\Entity | core/ |
Provides a trait for accessing changed time. | 4 | |||
EntityChangesDetectionTrait | trait | Drupal\Core\Entity | core/ |
Provides helper methods to detect changes in an entity object. | 2 | |||
EntityClone | final class | Drupal\Core\Config\Action\Plugin\ConfigAction | core/ |
@internal This API is experimental. | ||||
EntityComment | class | Drupal\comment\Plugin\migrate\destination | core/ |
Comment entity destination. | ||||
EntityCommentType | class | Drupal\comment\Plugin\migrate\destination | core/ |
Comment type destination. | ||||
EntityCondition | class | Drupal\jsonapi\Query | core/ |
A condition object for the EntityQuery. | 1 | |||
EntityConditionGroup | class | Drupal\jsonapi\Query | core/ |
A condition group for the EntityQuery. | 1 | |||
EntityConfigBase | class | Drupal\migrate\Plugin\migrate\destination | core/ |
Base destination class for importing configuration entities. | 13 | 9 | ||
EntityConfirmFormBase | abstract class | Drupal\Core\Entity | core/ |
Provides a generic base class for an entity-based confirmation form. | 8 | 7 | ||
EntityConstraintViolationList | class | Drupal\Core\Entity | core/ |
Implements an entity constraint violation list. | ||||
EntityConstraintViolationListInterface | interface | Drupal\Core\Entity | core/ |
Interface for the result of entity validation. | 1 | 9 | ||
EntityContentBase | class | Drupal\migrate\Plugin\migrate\destination | core/ |
Provides destination class for all content entities lacking a specific class. | 5 | 4 | ||
EntityContentComplete | class | Drupal\migrate\Plugin\migrate\destination | core/ |
Provides a destination for migrating the entire entity revision table. | 2 | |||
EntityContext | class | Drupal\Core\Plugin\Context | core/ |
Class to provide a specific entity context. | 7 | |||
EntityContextDefinition | class | Drupal\Core\Plugin\Context | core/ |
Defines a class to provide entity context definitions. | 8 | |||
EntityController | class | Drupal\Core\Entity\Controller | core/ |
Provides the add-page and title callbacks for entities. | 1 | |||
EntityConverter | class | Drupal\Core\ParamConverter | core/ |
Parameter converter for upcasting entity IDs to full objects. | 2 | 1 |