Classes, traits, and interfaces - 9.5.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 1523
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
EntityFormModeAddForm | class | Drupal\field_ui\Form | core/ |
Provides the add form for entity display modes. | ||||
EntityFormModeHalJsonAnonTest | class | Drupal\Tests\hal\Functional\Core | core/ |
@group hal @group legacy | ||||
EntityFormModeHalJsonBasicAuthTest | class | Drupal\Tests\hal\Functional\Core | core/ |
@group hal @group legacy | ||||
EntityFormModeHalJsonCookieTest | class | Drupal\Tests\hal\Functional\Core | core/ |
@group hal @group legacy | ||||
EntityFormModeInterface | interface | Drupal\Core\Entity | core/ |
Provides an interface defining an entity form mode entity type. | 1 | 2 | ||
EntityFormModeJsonAnonTest | class | Drupal\FunctionalTests\Rest | core/ |
@group rest | ||||
EntityFormModeJsonBasicAuthTest | class | Drupal\FunctionalTests\Rest | core/ |
@group rest | ||||
EntityFormModeJsonCookieTest | class | Drupal\FunctionalTests\Rest | core/ |
@group rest | ||||
EntityFormModeListBuilder | class | Drupal\field_ui | core/ |
Defines a class to build a listing of form mode entities. | ||||
EntityFormModeResourceTestBase | abstract class | Drupal\FunctionalTests\Rest | core/ |
9 | 3 | |||
EntityFormModeTest | class | Drupal\Tests\jsonapi\Functional | core/ |
JSON:API integration test for the "EntityFormMode" config entity type. | ||||
EntityFormModeXmlAnonTest | class | Drupal\FunctionalTests\Rest | core/ |
@group rest | ||||
EntityFormModeXmlBasicAuthTest | class | Drupal\FunctionalTests\Rest | core/ |
@group rest | ||||
EntityFormModeXmlCookieTest | class | Drupal\FunctionalTests\Rest | core/ |
@group rest | ||||
EntityFormTest | class | Drupal\Tests\Core\Entity | core/ |
@coversDefaultClass \Drupal\Core\Entity\EntityForm @group Entity | ||||
EntityFormTest | class | Drupal\Tests\system\Functional\Entity | core/ |
Tests the entity form. | ||||
EntityHandlerBase | abstract class | Drupal\Core\Entity | core/ |
Provides a base class for entity handlers. | 7 | 1 | ||
EntityHandlerInterface | interface | Drupal\Core\Entity | core/ |
Defines an interface for entity handlers. | 16 | 13 | ||
EntityHasFieldConstraint | class | Drupal\Core\Entity\Plugin\Validation\Constraint | core/ |
Checks if a value is an entity that has a specific field. | ||||
EntityHasFieldConstraintValidator | class | Drupal\Core\Entity\Plugin\Validation\Constraint | core/ |
Validates the EntityHasField constraint. | ||||
EntityHasFieldConstraintValidatorTest | class | Drupal\KernelTests\Core\Entity | core/ |
@covers \Drupal\Core\Entity\Plugin\Validation\Constraint\EntityHasFieldConstraintValidator | ||||
EntityImageStyle | class | Drupal\image\Plugin\migrate\destination | core/ |
Entity image style destination. | ||||
EntityInterface | interface | Drupal\Core\Entity | core/ |
Defines a common interface for all entity objects. | 11 | 305 | ||
EntityKernelTestBase | abstract class | Drupal\KernelTests\Core\Entity | core/ |
Defines an abstract test base for entity kernel tests. | 81 | 41 | ||
EntityKernelTestBaseTest | class | Drupal\KernelTests\Core\Entity | core/ |
@covers \Drupal\KernelTests\Core\Entity\EntityKernelTestBase | ||||
EntityKeysTest | class | Drupal\KernelTests\Core\Entity | core/ |
Test the behavior of entity keys. | ||||
EntityLabel | class | Drupal\views\Plugin\views\field | core/ |
Field handler to display entity label optionally linked to entity page. | ||||
EntityLanguageTestBase | abstract class | Drupal\KernelTests\Core\Entity | core/ |
Base class for language-aware entity tests. | 3 | |||
EntityLastInstalledSchemaRepository | class | Drupal\Core\Entity | core/ |
Provides a repository for installed entity definitions. | 2 | |||
EntityLastInstalledSchemaRepositoryInterface | interface | Drupal\Core\Entity | core/ |
Provides an interface for an installed entity definition repository. | 1 | 7 | ||
EntityLink | class | Drupal\views\Plugin\views\field | core/ |
Field handler to present a link to an entity. | 3 | 1 | ||
EntityLink | class | Drupal\comment\Plugin\views\field | core/ |
Handler for showing comment module's entity links. | ||||
EntityLinkDelete | class | Drupal\views\Plugin\views\field | core/ |
Field handler to present a link to delete an entity. | ||||
EntityLinkEdit | class | Drupal\views\Plugin\views\field | core/ |
Field handler to present a link to edit an entity. | ||||
EntityLinkTest | class | Drupal\Tests\Core\Entity | core/ |
@coversDefaultClass \Drupal\Core\Entity\EntityBase @group Entity | ||||
EntityListBuilder | class | Drupal\Core\Entity | core/ |
Defines a generic implementation to build a listing of entities. | 8 | 10 | ||
EntityListBuilderInterface | interface | Drupal\Core\Entity | core/ |
Defines an interface to build entity listings. | 2 | 1 | ||
EntityListBuilderTest | class | Drupal\Tests\Core\Entity | core/ |
@coversDefaultClass \Drupal\Core\Entity\EntityListBuilder @group Entity | ||||
EntityListBuilderTest | class | Drupal\Tests\system\Functional\Entity | core/ |
Tests entity list builder functionality. | ||||
EntityListController | class | Drupal\Core\Entity\Controller | core/ |
Defines a generic controller to list entities. | 2 | 2 | ||
EntityLoadByUuidTest | class | Drupal\KernelTests\Core\Entity | core/ |
Tests loading entities by UUID. | ||||
EntityMalformedException | class | Drupal\Core\Entity | core/ |
Defines an exception thrown when a malformed entity is passed. | 10 | |||
EntityModerationForm | class | Drupal\content_moderation\Form | core/ |
The EntityModerationForm provides a simple UI for changing moderation state. | 1 | |||
EntityModerationRouteProvider | class | Drupal\content_moderation\Entity\Routing | core/ |
Dynamic route provider for the Content moderation module. | 1 | |||
EntityNodeType | class | Drupal\node\Plugin\migrate\destination | core/ |
Plugin annotation @MigrateDestination( id = "entity:node_type" ) | ||||
EntityNonRevisionableTranslatableFieldTest | class | Drupal\KernelTests\Core\Entity | core/ |
Tests translating a non-revisionable field. | ||||
EntityNormalizer | class | Drupal\serialization\Normalizer | core/ |
Normalizes/denormalizes Drupal entity objects into an array structure. | 2 | 1 | 2 | |
EntityNormalizerTest | class | Drupal\Tests\serialization\Unit\Normalizer | core/ |
@coversDefaultClass \Drupal\serialization\Normalizer\EntityNormalizer @group serialization | ||||
EntityOperations | class | Drupal\views\Plugin\views\field | core/ |
Renders all operations links for an entity. | 1 | |||
EntityOperations | class | Drupal\content_moderation | core/ |
Defines a class for reacting to entity events. | 1 |
Pagination
- Previous page
- Page 54
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.