Classes, traits, and interfaces - 8.9.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 1511
Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
---|---|---|---|---|---|---|---|---|
EntityResourceAccessTrait | trait | Drupal\rest\Plugin\rest\resource | core/ |
@internal @todo Consider making public in https://www.drupal.org/node/2300677 | 1 | |||
EntityResourcePermissionsUpdateTest | class | Drupal\Tests\rest\Functional\Update | core/ |
Tests that existing sites continue to use permissions for EntityResource. | ||||
EntityResourcePostRouteSubscriber | class | Drupal\rest\EventSubscriber | core/ |
Generates a 'create' route for an entity type if it has a REST POST route. | 2 | |||
EntityResourceRestTestCoverageTest | class | Drupal\Tests\rest\Functional\EntityResource | core/ |
Checks that all core content/config entity types have REST test coverage. | ||||
EntityResourceTest | class | Drupal\Tests\jsonapi\Kernel\Controller | core/ |
@coversDefaultClass \Drupal\jsonapi\Controller\EntityResource @group jsonapi | ||||
EntityResourceTestBase | abstract class | Drupal\Tests\rest\Functional\EntityResource | core/ |
Even though there is the generic EntityResource, it's necessary for every entity type to have its own test, because they each have different fields, validation constraints, et cetera. It's not because the generic case works, that every case… | 50 | 50 | ||
EntityResourceValidationTrait | trait | Drupal\rest\Plugin\rest\resource | core/ |
@internal @todo Consider making public in https://www.drupal.org/node/2300677 | 3 | |||
EntityResourceValidationTraitTest | class | Drupal\Tests\rest\Unit | core/ |
@group rest @coversDefaultClass \Drupal\rest\Plugin\rest\resource\EntityResourceValidationTrait | ||||
EntityResourceValidationTraitTestClass | class | Drupal\Tests\rest\Unit | core/ |
A test class to use to test EntityResourceValidationTrait. | ||||
EntityReverse | class | Drupal\views\Plugin\views\relationship | core/ |
A relationship handlers which reverse entity references. | ||||
EntityRevision | class | Drupal\migrate\Plugin\migrate\destination | core/ |
Provides entity revision destination plugin. | 2 | 2 | ||
EntityRevision | class | Drupal\Tests\migrate\Unit\destination | core/ |
Mock that exposes from internal methods for testing. | ||||
EntityRevisionConverter | class | Drupal\content_moderation\ParamConverter | core/ |
Defines a class for making sure the edit-route loads the current draft. | 2 | |||
EntityRevisionConverterTest | class | Drupal\Tests\content_moderation\Kernel | core/ |
@coversDefaultClass \Drupal\content_moderation\ParamConverter\EntityRevisionConverter @group content_moderation @group legacy | ||||
EntityRevisionParamConverter | class | Drupal\Core\ParamConverter | core/ |
Parameter converter for upcasting entity revision IDs to full objects. | 1 | 2 | ||
EntityRevisionParamConverterTest | class | Drupal\Tests\Core\ParamConverter | core/ |
@coversDefaultClass \Drupal\Core\ParamConverter\EntityRevisionParamConverter @group entity | ||||
EntityRevisionRouteEnhancer | class | Drupal\Core\Routing\Enhancer | core/ |
Adds _entity_revision to the request attributes, if possible. | 1 | 2 | ||
EntityRevisionRouteEnhancerTest | class | Drupal\Tests\Core\Enhancer | core/ |
@coversDefaultClass \Drupal\Core\Routing\Enhancer\EntityRevisionRouteEnhancer @group Entity | ||||
EntityRevisionsTest | class | Drupal\KernelTests\Core\Entity | core/ |
Tests the loaded Revision of an entity. | ||||
EntityRevisionsTest | class | Drupal\Tests\system\Functional\Entity | core/ |
Create a entity with revisions and test viewing, saving, reverting, and deleting revisions. | ||||
EntityRevisionTest | class | Drupal\Tests\migrate\Unit\destination | core/ |
Tests entity revision destination. | ||||
EntityRevisionTest | class | Drupal\Tests\migrate\Unit\Plugin\migrate\destination | core/ |
Tests entity revision destination functionality. | ||||
EntityRevisionTest | class | Drupal\Tests\migrate\Kernel\Plugin | core/ |
Tests the EntityRevision destination plugin. | ||||
EntityRevisionTestDestination | class | Drupal\Tests\migrate\Unit\Plugin\migrate\destination | core/ |
Stub class for testing EntityRevision methods. | ||||
EntityRevisionTranslationTest | class | Drupal\KernelTests\Core\Entity | core/ |
Tests proper revision propagation of entities. | ||||
EntityRouteAlterSubscriber | class | Drupal\Core\EventSubscriber | core/ |
Registers the 'type' of route parameter names that match an entity type. | 2 | |||
EntityRouteEnhancer | class | Drupal\Core\Entity\Enhancer | core/ |
Enhances an entity form route with the appropriate controller. | 1 | 2 | ||
EntityRouteEnhancerTest | class | Drupal\Tests\Core\Entity\Enhancer | core/ |
@coversDefaultClass \Drupal\Core\Entity\Enhancer\EntityRouteEnhancer @group Entity | ||||
EntityRouteProviderInterface | interface | Drupal\Core\Entity\Routing | core/ |
Allows entity types to provide routes. | 4 | 3 | ||
EntityRouteProviderSubscriber | class | Drupal\Core\EventSubscriber | core/ |
Ensures that routes can be provided by entity types. | 2 | |||
EntityRow | class | Drupal\views\Plugin\views\row | core/ |
Generic entity row plugin to provide a common base for all entity types. | 2 | 2 | ||
EntitySavedCommand | class | Drupal\quickedit\Ajax | core/ |
AJAX command to indicate the entity was loaded from PrivateTempStore and saved into the database. | 1 | |||
EntitySchemaSubscriber | class | Drupal\entity_test_update\EventSubscriber | core/ |
Defines a class for listening to entity schema changes. | 2 | |||
EntitySchemaSubscriber | class | Drupal\workspaces\EventSubscriber | core/ |
Defines a class for listening to entity schema changes. | 2 | |||
EntitySchemaTest | class | Drupal\KernelTests\Core\Entity | core/ |
Tests the default entity storage schema handler. | ||||
EntitySearchPage | class | Drupal\search\Plugin\migrate\destination | core/ |
Migrate destination for search page. | ||||
EntitySerializationTest | class | Drupal\Tests\serialization\Kernel | core/ |
Tests that entities can be serialized to supported core formats. | ||||
EntitySerializedField | class | Drupal\entity_test\Entity | core/ |
Defines a test class for testing fields with a serialized column. | 2 | |||
EntityShortcutSet | class | Drupal\shortcut\Plugin\migrate\destination | core/ |
Plugin annotation @MigrateDestination( id = "entity:shortcut_set" ) | ||||
EntityStateChangeValidationTest | class | Drupal\Tests\content_moderation\Kernel | core/ |
@coversDefaultClass \Drupal\content_moderation\Plugin\Validation\Constraint\ModerationStateConstraintValidator @group content_moderation | ||||
EntityStorageBase | abstract class | Drupal\Core\Entity | core/ |
A base entity storage class. | 3 | 2 | ||
EntityStorageException | class | Drupal\Core\Entity | core/ |
Defines an exception thrown when storage operations fail. | 2 | 26 | ||
EntityStorageInterface | interface | Drupal\Core\Entity | core/ |
Defines the interface for entity storage classes. | 7 | 141 | ||
EntityStorageSchemaInterface | interface | Drupal\Core\Entity\Schema | core/ |
Defines the interface for entity storage schema handler classes. | 1 | 1 | ||
EntityTest | class | Drupal\Tests\views\Unit\Plugin\argument_validator | core/ |
@coversDefaultClass \Drupal\views\Plugin\views\argument_validator\Entity @group views | ||||
EntityTest | class | Drupal\Tests\views\Unit\Plugin\area | core/ |
@coversDefaultClass \Drupal\views\Plugin\views\area\Entity @group Entity | ||||
EntityTest | class | Drupal\entity_test\Entity | core/ |
Defines the test entity class. | 30 | 152 | ||
EntityTestAccessControlHandler | class | Drupal\entity_test | core/ |
Defines the access control handler for the test entity type. | ||||
EntityTestAdminRoutes | class | Drupal\entity_test\Entity | core/ |
Defines a test entity type with administrative routes. | 1 | |||
EntityTestBase | class | Drupal\Tests\migrate\Unit\Plugin\migrate\destination | core/ |
Base test class forentity migration destination functionality. | 2 |
Pagination
- Previous page
- Page 56
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.