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 |
|---|---|---|---|---|---|---|---|---|
| EntityTranslationRenderTrait | trait | Drupal\views\Entity\Render | core/ |
Trait used to instantiate the view's entity translation renderer. | 6 | |||
| EntityTranslationSettings | class | Drupal\content_translation\Plugin\migrate\source\d7 | core/ |
Drupal 7 Entity Translation settings (variables) from database. | 1 | |||
| EntityTranslationSettingsTest | class | Drupal\Tests\content_translation\Kernel\Plugin\migrate\source\d7 | core/ |
Tests entity translation settings source plugin. | ||||
| EntityTranslationTest | class | Drupal\KernelTests\Core\Entity | core/ |
Tests entity translation functionality. | ||||
| EntityType | class | Drupal\Core\Entity\Attribute | core/ |
Defines an entity type for plugin discovery. | 2 | 2 | ||
| EntityType | class | Drupal\Core\Entity | core/ |
Provides an implementation of an entity type and its metadata. | 2 | 13 | ||
| EntityType | class | Drupal\Core\Entity\Annotation | core/ |
Defines an Entity type annotation object. | 2 | |||
| EntityTypeBundleInfo | class | Drupal\Core\Entity | core/ |
Provides discovery and retrieval of entity type bundles. | 1 | 2 | ||
| EntityTypeBundleInfoInterface | interface | Drupal\Core\Entity | core/ |
Provides an interface for an entity type bundle info. | 1 | 82 | ||
| EntityTypeBundleInfoTest | class | Drupal\Tests\Core\Entity | core/ |
Tests Drupal\Core\Entity\EntityTypeBundleInfo. | ||||
| EntityTypeConstraint | class | Drupal\Core\Entity\Plugin\Validation\Constraint | core/ |
Checks if a value is a valid entity type. | ||||
| EntityTypeConstraintsTest | class | Drupal\KernelTests\Core\Entity | core/ |
Tests entity level validation constraints. | ||||
| EntityTypeConstraintValidator | class | Drupal\Core\Entity\Plugin\Validation\Constraint | core/ |
Validates the EntityType constraint. | ||||
| EntityTypeConstraintValidatorTest | class | Drupal\KernelTests\Core\Entity | core/ |
Tests validation constraints for EntityTypeConstraintValidator. | ||||
| EntityTypedDataDefinitionTest | class | Drupal\KernelTests\Core\Entity | core/ |
Tests deriving metadata of entity and field data types. | ||||
| EntityTypeEvent | class | Drupal\Core\Entity | core/ |
Defines a base class for all entity type events. | 1 | |||
| EntityTypeEvents | final class | Drupal\Core\Entity | core/ |
Contains all events thrown while handling entity types. | 3 | |||
| EntityTypeEventSubscriberTrait | trait | Drupal\Core\Entity | core/ |
Helper methods for EntityTypeListenerInterface. | 4 | |||
| EntityTypeIdLengthException | class | Drupal\Core\Entity\Exception | core/ |
Defines an exception thrown when an entity ID is too long. | 2 | |||
| EntityTypeInfo | class | Drupal\content_moderation | core/ |
Manipulates entity type information. | 2 | |||
| EntityTypeInfo | class | Drupal\workspaces\Hook | core/ |
Defines a class for reacting to entity type information hooks. | ||||
| EntityTypeInfoTest | class | Drupal\Tests\content_moderation\Kernel | core/ |
Tests Drupal\content_moderation\EntityTypeInfo. | ||||
| EntityTypeInterface | interface | Drupal\Core\Entity | core/ |
Provides an interface for an entity type and its metadata. | 3 | 268 | ||
| EntityTypeListener | class | Drupal\Core\Entity | core/ |
Reacts to entity type CRUD on behalf of the Entity system. | 2 | |||
| EntityTypeListenerInterface | interface | Drupal\Core\Entity | core/ |
Interface for entity type create, delete and update operations. | 6 | 5 | ||
| EntityTypeManager | class | Drupal\Core\Entity | core/ |
Manages entity type plugin definitions. | 1 | 8 | 2 | |
| EntityTypeManagerInterface | interface | Drupal\Core\Entity | core/ |
Provides an interface for entity type managers. | 1 | 441 | ||
| EntityTypeManagerTest | class | Drupal\Tests\Core\Entity | core/ |
Tests Drupal\Core\Entity\EntityTypeManager. | ||||
| EntityTypeManagerTestEntity | abstract class | Drupal\Tests\Core\Entity | core/ |
Provides a content entity with dummy static method implementations. | 1 | |||
| EntityTypeManagerTestEntityBundle | abstract class | Drupal\Tests\Core\Entity | core/ |
Provides a bundle specific class with dummy static method implementations. | ||||
| EntityTypeRepository | class | Drupal\Core\Entity | core/ |
Provides helper methods for loading entity types. | 1 | 2 | ||
| EntityTypeRepositoryInterface | interface | Drupal\Core\Entity | core/ |
Provides an interface for helper methods for loading entity types. | 1 | 11 | ||
| EntityTypeRepositoryTest | class | Drupal\Tests\Core\Entity | core/ |
Tests Drupal\Core\Entity\EntityTypeRepository. | ||||
| EntityTypeTest | class | Drupal\Tests\Core\Entity | core/ |
Tests Drupal\Core\Entity\EntityType. | ||||
| EntityTypeTest | class | Drupal\KernelTests\Core\Entity | core/ |
Tests general features of entity types. | ||||
| EntityTypeWithoutLanguageFormTest | class | Drupal\Tests\language\Functional | core/ |
Tests entity type without language support. | ||||
| EntityTypeWithoutViewsDataTest | class | Drupal\Tests\datetime_range\Kernel\Views | core/ |
Tests datetime_range.module when an entity type provides no views data. | ||||
| EntityUnitTest | class | Drupal\Tests\Core\Entity | core/ |
Tests Drupal\Core\Entity\EntityBase. | ||||
| EntityUntranslatableFieldsConstraint | class | Drupal\Core\Entity\Plugin\Validation\Constraint | core/ |
Validation constraint for the entity changed timestamp. | ||||
| EntityUntranslatableFieldsConstraintValidator | class | Drupal\Core\Entity\Plugin\Validation\Constraint | core/ |
Validates the EntityChanged constraint. | ||||
| EntityUpdateInitialTest | class | Drupal\Tests\system\Functional\UpdateSystem | core/ |
Tests handling of existing initial keys during updates. | ||||
| EntityUpdateTest | class | Drupal\Tests\editor\Kernel | core/ |
Tests updating an entity. | ||||
| EntityUrlLanguageTest | class | Drupal\Tests\language\Kernel | core/ |
Tests the language of entity URLs. | ||||
| EntityUrlTest | class | Drupal\Tests\Core\Entity | core/ |
Tests URL handling of the \Drupal\Core\Entity\EntityBase class. | ||||
| EntityUser | class | Drupal\user\Plugin\migrate\destination | core/ |
Provides a destination plugin for migrating user entities. | ||||
| EntityUserRole | in drupal:11.3.0 and is removed from drupal:12.0.0. There is no replacement. |
class | Drupal\user\Plugin\migrate\destination | core/ |
Provides a destination plugin for migrating user role entities. | |||
| EntityUuidConverter | class | Drupal\jsonapi\ParamConverter | core/ |
Parameter converter for upcasting entity UUIDs to full objects. | 2 | |||
| EntityUuidIdTest | class | Drupal\FunctionalTests\Entity | core/ |
Tests that an entity with a UUID as ID can be managed. | ||||
| EntityUUIDTest | class | Drupal\KernelTests\Core\Entity | core/ |
Tests creation, saving, and loading of entity UUIDs. | ||||
| EntityValidationException | class | Drupal\migrate\Exception | core/ |
To throw when an entity generated during the import is not valid. | 1 |
Pagination
- Previous page
- Page 69
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.