Classes, traits, and interfaces - 11.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 1519

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
EntityNormalizer class Drupal\serialization\Normalizer core/modules/serialization/src/Normalizer/EntityNormalizer.php Normalizes/denormalizes Drupal entity objects into an array structure. 2 1 2
EntityNormalizer class Drupal\serialization\Normalizer core/modules/serialization/src/Normalizer/EntityNormalizer.php Normalizes/denormalizes Drupal entity objects into an array structure. 2 1 2
EntityNormalizer class Drupal\serialization\Normalizer core/modules/serialization/src/Normalizer/EntityNormalizer.php Normalizes/denormalizes Drupal entity objects into an array structure. 2 1 2
EntityNormalizer class Drupal\serialization\Normalizer core/modules/serialization/src/Normalizer/EntityNormalizer.php Normalizes/denormalizes Drupal entity objects into an array structure. 2 1 2
EntityNormalizer class Drupal\serialization\Normalizer core/modules/serialization/src/Normalizer/EntityNormalizer.php Normalizes/denormalizes Drupal entity objects into an array structure. 2 1 2
EntityNormalizer class Drupal\serialization\Normalizer core/modules/serialization/src/Normalizer/EntityNormalizer.php Normalizes/denormalizes Drupal entity objects into an array structure. 2 1 2
EntityNormalizer class Drupal\serialization\Normalizer core/modules/serialization/src/Normalizer/EntityNormalizer.php Normalizes/denormalizes Drupal entity objects into an array structure. 2 1 2
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 Tests Drupal\serialization\Normalizer\EntityNormalizer.
EntityOperations class Drupal\views\Plugin\views\field core/modules/views/src/Plugin/views/field/EntityOperations.php Renders all operations links for an entity. 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
EntityOperations class Drupal\content_moderation core/modules/content_moderation/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\workspaces\Hook core/modules/workspaces/src/Hook/EntityOperations.php Defines a class for reacting to entity runtime hooks.
EntityOperationsCacheabilityTest class Drupal\Tests\system\Kernel\Entity core/modules/system/tests/src/Kernel/Entity/EntityOperationsCacheabilityTest.php Tests cacheability added by entity operations.
EntityOperationsTest class Drupal\Tests\content_moderation\Kernel core/modules/content_moderation/tests/src/Kernel/EntityOperationsTest.php @coversDefaultClass \Drupal\content_moderation\EntityOperations[[api-linebreak]]
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 Tests Drupal\views\Plugin\views\field\EntityOperations.
EntityOriginalDeprecationTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityOriginalDeprecationTest.php Tests the deprecations of the original property.
EntityOwnerInterface interface Drupal\user core/modules/user/src/EntityOwnerInterface.php Defines a common interface for entities that have an owner. 7 17
EntityOwnerInterface interface Drupal\user core/modules/user/src/EntityOwnerInterface.php Defines a common interface for entities that have an owner. 7 17
EntityOwnerInterface interface Drupal\user core/modules/user/src/EntityOwnerInterface.php Defines a common interface for entities that have an owner. 7 17
EntityOwnerInterface interface Drupal\user core/modules/user/src/EntityOwnerInterface.php Defines a common interface for entities that have an owner. 7 17
EntityOwnerTrait trait Drupal\user core/modules/user/src/EntityOwnerTrait.php Provides a trait for entities that have an owner. 6
EntityOwnerTrait trait Drupal\user core/modules/user/src/EntityOwnerTrait.php Provides a trait for entities that have an owner. 6
EntityPermissionsForm class Drupal\user\Form core/modules/user/src/Form/EntityPermissionsForm.php Provides the permissions administration form for a bundle. 1
EntityPermissionsForm class Drupal\user\Form core/modules/user/src/Form/EntityPermissionsForm.php Provides the permissions administration form for a bundle. 1
EntityPermissionsFormTest class Drupal\Tests\user\Unit\Form core/modules/user/tests/src/Unit/Form/EntityPermissionsFormTest.php Tests the permissions administration form for a bundle.
EntityPermissionsRouteProvider class Drupal\user\Entity core/modules/user/src/Entity/EntityPermissionsRouteProvider.php Provides routes for the entity permissions form. 1 6
EntityPermissionsRouteProvider class Drupal\user\Entity core/modules/user/src/Entity/EntityPermissionsRouteProvider.php Provides routes for the entity permissions form. 1 6
EntityPermissionsRouteProvider class Drupal\user\Entity core/modules/user/src/Entity/EntityPermissionsRouteProvider.php Provides routes for the entity permissions form. 1 6
EntityPermissionsRouteProvider class Drupal\user\Entity core/modules/user/src/Entity/EntityPermissionsRouteProvider.php Provides routes for the entity permissions form. 1 6
EntityPermissionsRouteProviderWithCheck

in drupal:11.1.0 and is removed from drupal:12.0.0. Use EntityPermissionsRouteProvider instead.

class Drupal\user\Entity core/modules/user/src/Entity/EntityPermissionsRouteProviderWithCheck.php Provides routes for the entity permissions form with a custom access check. 1
EntityPermissionsRouteProviderWithCheck

in drupal:11.1.0 and is removed from drupal:12.0.0. Use EntityPermissionsRouteProvider instead.

class Drupal\user\Entity core/modules/user/src/Entity/EntityPermissionsRouteProviderWithCheck.php Provides routes for the entity permissions form with a custom access check. 1
EntityPermissionsRouteProviderWithCheckTest class Drupal\Tests\user\Unit\Entity core/modules/user/tests/src/Unit/Entity/EntityPermissionsRouteProviderWithCheckTest.php Tests the route provider deprecation.
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. 3
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. 3
EntityPublishedInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityPublishedInterface.php Provides an interface for access to an entity's published state. 11 27
EntityPublishedInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityPublishedInterface.php Provides an interface for access to an entity's published state. 11 27
EntityPublishedInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityPublishedInterface.php Provides an interface for access to an entity's published state. 11 27
EntityPublishedInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityPublishedInterface.php Provides an interface for access to an entity's published state. 11 27
EntityPublishedTrait trait Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityPublishedTrait.php Provides a trait for published status. 5
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.
EntityQueryServiceDeprecationTest class Drupal\Tests\pgsql\Kernel core/modules/pgsql/tests/src/Kernel/EntityQueryServiceDeprecationTest.php Tests the move of the 'pgsql.entity.query.sql' service.
EntityQueryTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php Tests Entity Query functionality.
EntityReference class Drupal\views\Plugin\views\row core/modules/views/src/Plugin/views/row/EntityReference.php EntityReference row plugin.
EntityReference class Drupal\views\Plugin\views\display core/modules/views/src/Plugin/views/display/EntityReference.php The plugin that handles an EntityReference display.

Other projects


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