Classes, traits, and interfaces - main - 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 1529

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
EntityFieldValueTraitTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityFieldValueTraitTest.php Tests the EntityFieldValueTrait.
EntityFile class Drupal\file\Plugin\migrate\destination core/modules/file/src/Plugin/migrate/destination/EntityFile.php Provides migrate destination plugin for File entities.
EntityFilteringThemeTest class Drupal\Tests\system\Functional\Theme core/modules/system/tests/src/Functional/Theme/EntityFilteringThemeTest.php Tests XSS filtering for themed output for each entity type in all themes.
EntityForm class Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityForm.php Base class for entity forms. 32 33
EntityFormBuilder class Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityFormBuilder.php Builds entity forms. 1 2
EntityFormBuilderInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityFormBuilderInterface.php Builds entity forms. 1 2
EntityFormBuilderTest class Drupal\Tests\Core\Entity core/tests/Drupal/Tests/Core/Entity/EntityFormBuilderTest.php Tests Drupal\Core\Entity\EntityFormBuilder.
EntityFormDisplay class Drupal\Core\Entity\Entity core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php Configuration entity. 53
EntityFormDisplayAccessControlHandler class Drupal\Core\Entity\Entity\Access core/lib/Drupal/Core/Entity/Entity/Access/EntityFormDisplayAccessControlHandler.php Provides an entity access control handler for form displays. 2
EntityFormDisplayAccessControlHandlerTest class Drupal\Tests\Core\Entity\Access core/tests/Drupal/Tests/Core/Entity/Access/EntityFormDisplayAccessControlHandlerTest.php Tests Drupal\Core\Entity\Entity\Access\EntityFormDisplayAccessControlHandler. 1
EntityFormDisplayEditForm class Drupal\field_ui\Form core/modules/field_ui/src/Form/EntityFormDisplayEditForm.php Edit form for the EntityFormDisplay entity type.
EntityFormDisplayInterface interface Drupal\Core\Entity\Display core/lib/Drupal/Core/Entity/Display/EntityFormDisplayInterface.php Provides a common interface for entity form displays. 1 14
EntityFormDisplayJsonAnonTest class Drupal\FunctionalTests\Rest core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonAnonTest.php Tests Entity Form Display Json Anon.
EntityFormDisplayJsonBasicAuthTest class Drupal\FunctionalTests\Rest core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonBasicAuthTest.php Tests Entity Form Display Json Basic Auth.
EntityFormDisplayJsonCookieTest class Drupal\FunctionalTests\Rest core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonCookieTest.php Tests Entity Form Display Json Cookie.
EntityFormDisplayResourceTestBase abstract class Drupal\FunctionalTests\Rest core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayResourceTestBase.php Resource test base for the entity_form_display entity. 6
EntityFormDisplayTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/EntityFormDisplayTest.php JSON:API integration test for the "EntityFormDisplay" config entity type.
EntityFormDisplayTest class Drupal\Tests\field_ui\Kernel core/modules/field_ui/tests/src/Kernel/EntityFormDisplayTest.php Tests the entity display configuration entities.
EntityFormDisplayValidationTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityFormDisplayValidationTest.php Tests validation of entity_form_display entities.
EntityFormDisplayXmlAnonTest class Drupal\FunctionalTests\Rest core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlAnonTest.php Tests Entity Form Display Xml Anon.
EntityFormDisplayXmlBasicAuthTest class Drupal\FunctionalTests\Rest core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlBasicAuthTest.php Tests Entity Form Display Xml Basic Auth.
EntityFormDisplayXmlCookieTest class Drupal\FunctionalTests\Rest core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlCookieTest.php Tests Entity Form Display Xml Cookie.
EntityFormInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityFormInterface.php Defines an interface for entity form classes. 4 7
EntityFormMode class Drupal\Core\Entity\Entity core/lib/Drupal/Core/Entity/Entity/EntityFormMode.php Defines the entity form mode configuration entity class. 15
EntityFormModeAddForm class Drupal\field_ui\Form core/modules/field_ui/src/Form/EntityFormModeAddForm.php Provides the add form for entity display modes.
EntityFormModeInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityFormModeInterface.php Provides an interface defining an entity form mode entity type. 1 2
EntityFormModeJsonAnonTest class Drupal\FunctionalTests\Rest core/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonAnonTest.php Tests Entity Form Mode Json Anon.
EntityFormModeJsonBasicAuthTest class Drupal\FunctionalTests\Rest core/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonBasicAuthTest.php Tests Entity Form Mode Json Basic Auth.
EntityFormModeJsonCookieTest class Drupal\FunctionalTests\Rest core/tests/Drupal/FunctionalTests/Rest/EntityFormModeJsonCookieTest.php Tests Entity Form Mode Json Cookie.
EntityFormModeListBuilder class Drupal\field_ui core/modules/field_ui/src/EntityFormModeListBuilder.php Defines a class to build a listing of form mode entities.
EntityFormModeResourceTestBase abstract class Drupal\FunctionalTests\Rest core/tests/Drupal/FunctionalTests/Rest/EntityFormModeResourceTestBase.php Resource test base for the entity_form_mode entity. 6
EntityFormModeTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/EntityFormModeTest.php JSON:API integration test for the "EntityFormMode" config entity type.
EntityFormModeUpdatePathTest class Drupal\Tests\system\Functional\Update core/modules/system/tests/src/Functional/Update/EntityFormModeUpdatePathTest.php Tests update path for the entity form mode description value from '' to NULL.
EntityFormModeValidationTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityFormModeValidationTest.php Tests validation of entity_form_mode entities.
EntityFormModeXmlAnonTest class Drupal\FunctionalTests\Rest core/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlAnonTest.php Tests Entity Form Mode Xml Anon.
EntityFormModeXmlBasicAuthTest class Drupal\FunctionalTests\Rest core/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlBasicAuthTest.php Tests Entity Form Mode Xml Basic Auth.
EntityFormModeXmlCookieTest class Drupal\FunctionalTests\Rest core/tests/Drupal/FunctionalTests/Rest/EntityFormModeXmlCookieTest.php Tests Entity Form Mode Xml Cookie.
EntityFormTest class Drupal\Tests\Core\Entity core/tests/Drupal/Tests/Core/Entity/EntityFormTest.php Tests Drupal\Core\Entity\EntityForm.
EntityFormTest class Drupal\Tests\system\Functional\Entity core/modules/system/tests/src/Functional/Entity/EntityFormTest.php Tests the entity form.
EntityHandlerBase abstract class Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityHandlerBase.php Provides a base class for entity handlers. 6 2
EntityHandlerInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityHandlerInterface.php Defines an interface for entity handlers. 19 16
EntityHasFieldConstraint class Drupal\Core\Entity\Plugin\Validation\Constraint core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityHasFieldConstraint.php Checks if a value is an entity that has a specific field.
EntityHasFieldConstraintValidator class Drupal\Core\Entity\Plugin\Validation\Constraint core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/EntityHasFieldConstraintValidator.php Validates the EntityHasField constraint. 1
EntityHasFieldConstraintValidatorTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityHasFieldConstraintValidatorTest.php Tests Entity Has Field Constraint Validator.
EntityImageStyle class Drupal\image\Plugin\migrate\destination core/modules/image/src/Plugin/migrate/destination/EntityImageStyle.php Entity image style destination.
EntityInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityInterface.php Defines a common interface for all entity objects. 10 343
EntityKernelTestBase abstract class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBase.php Defines an abstract test base for entity kernel tests. 88 43
EntityKernelTestBaseTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityKernelTestBaseTest.php Tests Entity Kernel Test Base.
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.

Other projects


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