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
EntityKeysTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityKeysTest.php Test the behavior of entity keys.
EntityLabel class Drupal\views\Plugin\views\field core/modules/views/src/Plugin/views/field/EntityLabel.php Field handler to display entity label optionally linked to entity page.
EntityLabelTest class Drupal\Tests\system\Kernel\Entity core/modules/system/tests/src/Kernel/Entity/EntityLabelTest.php Tests that entity type labels use sentence-case.
EntityLanguageTestBase abstract class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php Base class for language-aware entity tests. 3
EntityLanguageTestBase abstract class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityLanguageTestBase.php Base class for language-aware entity tests. 3
EntityLastInstalledSchemaRepository class Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php Provides a repository for installed entity definitions. 2
EntityLastInstalledSchemaRepository class Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepository.php Provides a repository for installed entity definitions. 2
EntityLastInstalledSchemaRepositoryInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepositoryInterface.php Provides an interface for an installed entity definition repository. 1 7
EntityLastInstalledSchemaRepositoryInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepositoryInterface.php Provides an interface for an installed entity definition repository. 1 7
EntityLastInstalledSchemaRepositoryInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepositoryInterface.php Provides an interface for an installed entity definition repository. 1 7
EntityLastInstalledSchemaRepositoryInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityLastInstalledSchemaRepositoryInterface.php Provides an interface for an installed entity definition repository. 1 7
EntityLink class Drupal\comment\Plugin\views\field core/modules/comment/src/Plugin/views/field/EntityLink.php Handler for showing comment module's entity links. 1
EntityLink class Drupal\comment\Plugin\views\field core/modules/comment/src/Plugin/views/field/EntityLink.php Handler for showing comment module's entity links. 1
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 2
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 2
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 2
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 2
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.
EntityLinkTest class Drupal\Tests\comment\Unit\Plugin\views\field core/modules/comment/tests/src/Unit/Plugin/views/field/EntityLinkTest.php Tests Drupal\comment\Plugin\views\field\EntityLink.
EntityLinkTest class Drupal\Tests\Core\Entity core/tests/Drupal/Tests/Core/Entity/EntityLinkTest.php Tests Drupal\Core\Entity\EntityBase.
EntityListBuilder class Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityListBuilder.php Defines a generic implementation to build a listing of entities. 9 16
EntityListBuilder class Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityListBuilder.php Defines a generic implementation to build a listing of entities. 9 16
EntityListBuilder class Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityListBuilder.php Defines a generic implementation to build a listing of entities. 9 16
EntityListBuilder class Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityListBuilder.php Defines a generic implementation to build a listing of entities. 9 16
EntityListBuilderInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityListBuilderInterface.php Defines an interface to build entity listings. 2 1
EntityListBuilderInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityListBuilderInterface.php Defines an interface to build entity listings. 2 1
EntityListBuilderInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityListBuilderInterface.php Defines an interface to build entity listings. 2 1
EntityListBuilderInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityListBuilderInterface.php Defines an interface to build entity listings. 2 1
EntityListBuilderTest class Drupal\Tests\Core\Entity core/tests/Drupal/Tests/Core/Entity/EntityListBuilderTest.php Tests Drupal\Core\Entity\EntityListBuilder.
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
EntityListController class Drupal\Core\Entity\Controller core/lib/Drupal/Core/Entity/Controller/EntityListController.php Defines a generic controller to list entities. 2 2
EntityListController class Drupal\Core\Entity\Controller core/lib/Drupal/Core/Entity/Controller/EntityListController.php Defines a generic controller to list entities. 2 2
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
EntityMalformedException class Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityMalformedException.php Defines an exception thrown when a malformed entity is passed. 10
EntityMethod final class Drupal\Core\Config\Action\Plugin\ConfigAction core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/EntityMethod.php Makes config entity methods with the ActionMethod attribute into actions.
EntityMethodConfigActionsTest class Drupal\KernelTests\Core\Recipe core/tests/Drupal/KernelTests/Core/Recipe/EntityMethodConfigActionsTest.php @group Recipe
EntityMethodDeriver final class Drupal\Core\Config\Action\Plugin\ConfigAction\Deriver core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/Deriver/EntityMethodDeriver.php Derives config action methods from attributed config entity methods. 1
EntityMethodDeriver final class Drupal\Core\Config\Action\Plugin\ConfigAction\Deriver core/lib/Drupal/Core/Config/Action/Plugin/ConfigAction/Deriver/EntityMethodDeriver.php Derives config action methods from attributed config entity methods. 1
EntityMethodException final class Drupal\Core\Config\Action core/lib/Drupal/Core/Config/Action/EntityMethodException.php @internal This API is experimental. 3
EntityMethodException final class Drupal\Core\Config\Action core/lib/Drupal/Core/Config/Action/EntityMethodException.php @internal This API is experimental. 3
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
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
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 Migration destination for node type entity.
EntityNonRevisionableTranslatableFieldTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityNonRevisionableTranslatableFieldTest.php Tests translating a non-revisionable field.

Other projects


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