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 |
|---|---|---|---|---|---|---|---|---|
| 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 | 445 | ||
| 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 | |||
| EntityValidationTest | class | Drupal\KernelTests\Core\Entity | core/ |
Tests the Entity Validation API. | ||||
| EntityValidationTrait | trait | Drupal\jsonapi\Entity | core/ |
Provides a method to validate an entity. | 2 | |||
| EntityViewAlterTest | class | Drupal\Tests\layout_builder\Kernel | core/ |
Tests Entity View Alter. | ||||
| EntityViewBuilder | class | Drupal\Core\Entity | core/ |
Base class for entity view builders. | 7 | 11 | ||
| EntityViewBuilderInterface | interface | Drupal\Core\Entity | core/ |
Defines an interface for entity view builders. | 1 | 3 | ||
| EntityViewBuilderTest | class | Drupal\KernelTests\Core\Entity | core/ |
Tests the entity view builder. | ||||
| EntityViewBuilderTest | class | Drupal\Tests\Core\Entity | core/ |
Tests Drupal\Core\Entity\EntityViewBuilder. | ||||
| EntityViewController | class | Drupal\Core\Entity\Controller | core/ |
Defines a generic controller to render a single entity. | 2 | 3 | ||
| EntityViewControllerTest | class | Drupal\Tests\system\Functional\Entity | core/ |
Tests EntityViewController functionality. | ||||
| EntityViewDisplay | class | Drupal\layout_builder_override\Entity | core/ |
Stub class to evaluate the override. | 1 | |||
| EntityViewDisplay | class | Drupal\Core\Entity\Entity | core/ |
Configuration entity. | 2 | 69 | ||
| EntityViewDisplayAccessControlHandler | class | Drupal\Core\Entity\Entity\Access | core/ |
Provides an entity access control handler for displays. | 2 | |||
| EntityViewDisplayAccessControlHandlerTest | class | Drupal\Tests\Core\Entity\Access | core/ |
Tests Drupal\Core\Entity\Entity\Access\EntityViewDisplayAccessControlHandler. | ||||
| EntityViewDisplayEditForm | class | Drupal\field_ui\Form | core/ |
Edit form for the EntityViewDisplay entity type. | 1 | 2 | ||
| EntityViewDisplayInterface | interface | Drupal\Core\Entity\Display | core/ |
Provides a common interface for entity view displays. | 2 | 34 | ||
| EntityViewDisplayJsonAnonTest | class | Drupal\FunctionalTests\Rest | core/ |
Tests Entity View Display Json Anon. | ||||
| EntityViewDisplayJsonBasicAuthTest | class | Drupal\FunctionalTests\Rest | core/ |
Tests Entity View Display Json Basic Auth. | ||||
| EntityViewDisplayJsonCookieTest | class | Drupal\FunctionalTests\Rest | core/ |
Tests Entity View Display Json Cookie. | ||||
| EntityViewDisplayOverviewController | class | Drupal\field_ui\Controller | core/ |
Defines a controller to list entity view displays. | ||||
| EntityViewDisplayResourceTestBase | abstract class | Drupal\FunctionalTests\Rest | core/ |
Resource test base for the entity_view_display entity. | 7 | 1 | ||
| EntityViewDisplayStatusController | class | Drupal\field_ui\Controller | core/ |
Controller for enabling/disabling entity view displays. | ||||
| EntityViewDisplayTest | class | Drupal\Tests\jsonapi\Functional | core/ |
JSON:API integration test for the "EntityViewDisplay" config entity type. | 1 | 1 | ||
| EntityViewDisplayValidationTest | class | Drupal\KernelTests\Core\Entity | core/ |
Tests validation of entity_view_display entities. | ||||
| EntityViewDisplayXmlAnonTest | class | Drupal\FunctionalTests\Rest | core/ |
Tests Entity View Display Xml Anon. |
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.