Classes, traits, and interfaces - 8.9.x - drupal

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 1511

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
EntityLink class Drupal\views\Plugin\views\field core/modules/views/src/Plugin/views/field/EntityLink.php Field handler to present a link to an entity. 3 1
EntityLinkDelete class Drupal\views\Plugin\views\field core/modules/views/src/Plugin/views/field/EntityLinkDelete.php Field handler to present a link to delete an entity.
EntityLinkEdit class Drupal\views\Plugin\views\field core/modules/views/src/Plugin/views/field/EntityLinkEdit.php Field handler to present a link to edit an entity.
EntityLinkOutputUrlUpdateTest class Drupal\Tests\views\Functional\Update core/modules/views/tests/src/Functional/Update/EntityLinkOutputUrlUpdateTest.php Tests that the additional settings are added to the entity link field.
EntityLinkTest class Drupal\Tests\Core\Entity core/tests/Drupal/Tests/Core/Entity/EntityLinkTest.php @coversDefaultClass \Drupal\Core\Entity\Entity @group Entity
EntityListBuilder class Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityListBuilder.php Defines a generic implementation to build a listing of entities. 8 9
EntityListBuilderInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityListBuilderInterface.php Defines an interface to build entity listings. 2 2
EntityListBuilderTest class Drupal\Tests\Core\Entity core/tests/Drupal/Tests/Core/Entity/EntityListBuilderTest.php @coversDefaultClass \Drupal\entity_test\EntityTestListBuilder @group Entity
EntityListBuilderTest class Drupal\Tests\system\Functional\Entity core/modules/system/tests/src/Functional/Entity/EntityListBuilderTest.php Tests entity list builder functionality.
EntityListController class Drupal\Core\Entity\Controller core/lib/Drupal/Core/Entity/Controller/EntityListController.php Defines a generic controller to list entities. 2 2
EntityLoadByUuidTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityLoadByUuidTest.php Tests loading entities by UUID.
EntityMalformedException class Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityMalformedException.php Defines an exception thrown when a malformed entity is passed. 10
EntityManager class Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityManager.php Provides a wrapper around many other services relating to entities. 2 2
EntityManagerInterface

in drupal:8.0.0 and is removed from drupal:9.0.0.

interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityManagerInterface.php Provides an interface for entity type managers. 1 8
EntityManagerTest class Drupal\Tests\Core\Entity core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php @coversDefaultClass \Drupal\Core\Entity\EntityManager @group Entity @group legacy
EntityModerationForm class Drupal\content_moderation\Form core/modules/content_moderation/src/Form/EntityModerationForm.php The EntityModerationForm provides a simple UI for changing moderation state. 1
EntityModerationRouteProvider class Drupal\content_moderation\Entity\Routing core/modules/content_moderation/src/Entity/Routing/EntityModerationRouteProvider.php Dynamic route provider for the Content moderation module. 1
EntityNodeType class Drupal\node\Plugin\migrate\destination core/modules/node/src/Plugin/migrate/destination/EntityNodeType.php Plugin annotation @MigrateDestination( id = "entity:node_type" )
EntityNonRevisionableTranslatableFieldTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityNonRevisionableTranslatableFieldTest.php Tests translating a non-revisionable field.
EntityNormalizer class Drupal\serialization\Normalizer core/modules/serialization/src/Normalizer/EntityNormalizer.php Normalizes/denormalizes Drupal entity objects into an array structure. 2 1 2
EntityNormalizerTest class Drupal\Tests\serialization\Unit\Normalizer core/modules/serialization/tests/src/Unit/Normalizer/EntityNormalizerTest.php @coversDefaultClass \Drupal\serialization\Normalizer\EntityNormalizer @group serialization
EntityOperations class Drupal\workspaces core/modules/workspaces/src/EntityOperations.php Defines a class for reacting to entity events. 1
EntityOperations class Drupal\content_moderation core/modules/content_moderation/src/EntityOperations.php Defines a class for reacting to entity events. 1
EntityOperations class Drupal\views\Plugin\views\field core/modules/views/src/Plugin/views/field/EntityOperations.php Renders all operations links for an entity. 1
EntityOperationsTest class Drupal\Tests\content_moderation\Kernel core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php @coversDefaultClass \Drupal\content_moderation\EntityOperations
EntityOperationsTest class Drupal\Tests\system\Functional\Entity core/modules/system/tests/src/Functional/Entity/EntityOperationsTest.php Tests that operations can be injected from the hook.
EntityOperationsUnitTest class Drupal\Tests\views\Unit\Plugin\views\field core/modules/views/tests/src/Unit/Plugin/views/field/EntityOperationsUnitTest.php @coversDefaultClass \Drupal\views\Plugin\views\field\EntityOperations @group Views
EntityOwnerInterface interface Drupal\user core/modules/user/src/EntityOwnerInterface.php Defines a common interface for entities that have an owner. 7 14
EntityOwnerTrait trait Drupal\user core/modules/user/src/EntityOwnerTrait.php Provides a trait for entities that have an owner. 6
EntityPublishedActionDeriver class Drupal\Core\Action\Plugin\Action\Derivative core/lib/Drupal/Core/Action/Plugin/Action/Derivative/EntityPublishedActionDeriver.php Provides an action deriver that finds publishable entity types. 1
EntityPublishedInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityPublishedInterface.php Provides an interface for access to an entity's published state. 11 23
EntityPublishedTrait trait Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityPublishedTrait.php Provides a trait for published status. 5
EntityQueryAccessTest class Drupal\Tests\views\Functional\Entity core/modules/views/tests/src/Functional/Entity/EntityQueryAccessTest.php Tests that Views respects 'ENTITY_TYPE_access' query tags.
EntityQueryAggregateTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityQueryAggregateTest.php Tests the Entity Query Aggregation API.
EntityQueryRelationshipTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityQueryRelationshipTest.php Tests the Entity Query relationship API.
EntityQueryTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php Tests Entity Query functionality.
EntityReference

in drupal:8.7.0 and is removed from drupal:9.0.0. Use \Drupal\field\Plugin\migrate\field\d7\EntityReference instead.

class Drupal\Core\Field\Plugin\migrate\field\d7 core/lib/Drupal/Core/Field/Plugin/migrate/field/d7/EntityReference.php MigrateField plugin for Drupal 7 entity_reference fields. 1
EntityReference class Drupal\Core\Entity\Plugin\DataType core/lib/Drupal/Core/Entity/Plugin/DataType/EntityReference.php Defines an 'entity_reference' data type. 1
EntityReference class Drupal\views\Plugin\views\row core/modules/views/src/Plugin/views/row/EntityReference.php EntityReference row plugin. 1 1
EntityReference class Drupal\views\Plugin\views\display core/modules/views/src/Plugin/views/display/EntityReference.php The plugin that handles an EntityReference display. 1 1
EntityReference class Drupal\views\Plugin\views\style core/modules/views/src/Plugin/views/style/EntityReference.php EntityReference style plugin. 1 1
EntityReference class Drupal\field\Plugin\migrate\field\d7 core/modules/field/src/Plugin/migrate/field/d7/EntityReference.php MigrateField plugin for Drupal 7 entity_reference fields. 1 1
EntityReference

in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\views\Plugin\views\row\EntityReference instead.

class Drupal\entity_reference\Plugin\views\row core/modules/entity_reference/src/Plugin/views/row/EntityReference.php EntityReference row plugin.
EntityReference

in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\views\Plugin\views\display\EntityReference instead.

class Drupal\entity_reference\Plugin\views\display core/modules/entity_reference/src/Plugin/views/display/EntityReference.php Deprecated. The plugin that handles an EntityReference display.
EntityReference

in drupal:8.0.0 and is removed from drupal:9.0.0. Use \Drupal\views\Plugin\views\style\EntityReference instead.

class Drupal\entity_reference\Plugin\views\style core/modules/entity_reference/src/Plugin/views/style/EntityReference.php Deprecated. EntityReference style plugin.
EntityReferenceAdminTest class Drupal\Tests\field\FunctionalJavascript\EntityReference core/modules/field/tests/src/FunctionalJavascript/EntityReference/EntityReferenceAdminTest.php Tests for the administrative UI.
EntityReferenceAdminTest class Drupal\Tests\field\Functional\EntityReference core/modules/field/tests/src/Functional/EntityReference/EntityReferenceAdminTest.php Tests for the administrative UI.
EntityReferenceAutocompleteTagsWidget class Drupal\Core\Field\Plugin\Field\FieldWidget core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteTagsWidget.php Plugin implementation of the 'entity_reference_autocomplete_tags' widget.
EntityReferenceAutocompleteWidget class Drupal\Core\Field\Plugin\Field\FieldWidget core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/EntityReferenceAutocompleteWidget.php Plugin implementation of the 'entity_reference_autocomplete' widget. 1 2
EntityReferenceAutocompleteWidgetMatchLimitUpdateTest class Drupal\Tests\system\Functional\Update core/modules/system/tests/src/Functional/Update/EntityReferenceAutocompleteWidgetMatchLimitUpdateTest.php Tests that the match_limit setting is added to entity_reference_autocomplete.

Other projects


Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.