Classes, traits, and interfaces - 9.5.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 1523

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
EntityDisplayModeInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityDisplayModeInterface.php Provides an interface for entity types that hold form and view mode settings. 3
EntityDisplayModeListBuilder class Drupal\field_ui core/modules/field_ui/src/EntityDisplayModeListBuilder.php Defines a class to build a listing of view mode entities. 1
EntityDisplayModeTest class Drupal\Tests\field_ui\Functional core/modules/field_ui/tests/src/Functional/EntityDisplayModeTest.php Tests the entity display modes UI.
EntityDisplayPluginCollection class Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityDisplayPluginCollection.php A collection of formatters or widgets. 2
EntityDisplayRebuilder class Drupal\field core/modules/field/src/EntityDisplayRebuilder.php Rebuilds all form and view modes for a passed entity bundle. 1
EntityDisplayRepository class Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityDisplayRepository.php Provides a repository for entity display objects (view modes and form modes). 2
EntityDisplayRepositoryInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityDisplayRepositoryInterface.php Provides an interface for an entity display repository. 1 33
EntityDisplayRepositoryTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityDisplayRepositoryTest.php @coversDefaultClass \Drupal\Core\Entity\EntityDisplayRepository
EntityDisplayTest class Drupal\Tests\field_ui\FunctionalJavascript core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php Tests the UI for entity displays. 1 1
EntityDisplayTest class Drupal\Tests\field_ui\Kernel core/modules/field_ui/tests/src/Kernel/EntityDisplayTest.php Tests the entity display configuration entities.
EntityDisplayTest class Drupal\Tests\field_ui\Functional core/modules/field_ui/tests/src/Functional/EntityDisplayTest.php Tests the UI for entity displays.
EntityDisplayWithLayoutInterface interface Drupal\field_layout\Display core/modules/field_layout/src/Display/EntityDisplayWithLayoutInterface.php Provides a common interface for entity displays that have layout. 2 7
EntityDuplicateTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityDuplicateTest.php Test entity duplication.
EntityExists class Drupal\migrate\Plugin\migrate\process core/modules/migrate/src/Plugin/migrate/process/EntityExists.php This plugin checks if a given entity exists.
EntityExistsTest class Drupal\Tests\migrate\Kernel\Plugin core/modules/migrate/tests/src/Kernel/Plugin/EntityExistsTest.php Tests the EntityExists process plugin.
EntityField class Drupal\views\Plugin\views\field core/modules/views/src/Plugin/views/field/EntityField.php A field that displays entity field data. 5 8
EntityFieldDefaultValueTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityFieldDefaultValueTest.php Tests default values for entity fields.
EntityFieldDefinitionTrait trait Drupal\migrate core/modules/migrate/src/EntityFieldDefinitionTrait.php The entity field definition trait. 3
EntityFieldInstance class Drupal\migrate\Plugin\migrate\destination core/modules/migrate/src/Plugin/migrate/destination/EntityFieldInstance.php Provides destination plugin for field_config configuration entities.
EntityFieldManager class Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityFieldManager.php Manages the discovery of entity fields. 1 5 2
EntityFieldManagerInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityFieldManagerInterface.php Provides an interface for an entity field manager. 1 75
EntityFieldManagerTest class Drupal\Tests\Core\Entity core/tests/Drupal/Tests/Core/Entity/EntityFieldManagerTest.php @coversDefaultClass \Drupal\Core\Entity\EntityFieldManager @group Entity
EntityFieldRenderer class Drupal\views\Entity\Render core/modules/views/src/Entity/Render/EntityFieldRenderer.php Renders entity fields. 1
EntityFieldStorageConfig class Drupal\migrate\Plugin\migrate\destination core/modules/migrate/src/Plugin/migrate/destination/EntityFieldStorageConfig.php Provides destination plugin for field_storage_config configuration entities.
EntityFieldTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/EntityFieldTest.php Tests the Entity Field API.
EntityFile class Drupal\file\Plugin\migrate\destination core/modules/file/src/Plugin/migrate/destination/EntityFile.php Plugin annotation @MigrateDestination( id = "entity:file" )
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. 30 29
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 @coversDefaultClass \Drupal\Core\Entity\EntityFormBuilder @group Entity
EntityFormDisplay class Drupal\Core\Entity\Entity core/lib/Drupal/Core/Entity/Entity/EntityFormDisplay.php Configuration entity. 1 57
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. 1
EntityFormDisplayAccessControlHandlerTest class Drupal\Tests\Core\Entity\Access core/tests/Drupal/Tests/Core/Entity/Access/EntityFormDisplayAccessControlHandlerTest.php @coversDefaultClass \Drupal\Core\Entity\Entity\Access\EntityFormDisplayAccessControlHandler @group Entity 1
EntityFormDisplayEditForm class Drupal\field_ui\Form core/modules/field_ui/src/Form/EntityFormDisplayEditForm.php Edit form for the EntityFormDisplay entity type. 1 1
EntityFormDisplayHalJsonAnonTest class Drupal\Tests\hal\Functional\Core core/modules/hal/tests/src/Functional/Core/EntityFormDisplayHalJsonAnonTest.php @group hal @group legacy
EntityFormDisplayHalJsonBasicAuthTest class Drupal\Tests\hal\Functional\Core core/modules/hal/tests/src/Functional/Core/EntityFormDisplayHalJsonBasicAuthTest.php @group hal @group legacy
EntityFormDisplayHalJsonCookieTest class Drupal\Tests\hal\Functional\Core core/modules/hal/tests/src/Functional/Core/EntityFormDisplayHalJsonCookieTest.php @group hal @group legacy
EntityFormDisplayInterface interface Drupal\Core\Entity\Display core/lib/Drupal/Core/Entity/Display/EntityFormDisplayInterface.php Provides a common interface for entity form displays. 1 12
EntityFormDisplayJsonAnonTest class Drupal\FunctionalTests\Rest core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonAnonTest.php @group rest
EntityFormDisplayJsonBasicAuthTest class Drupal\FunctionalTests\Rest core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonBasicAuthTest.php @group rest
EntityFormDisplayJsonCookieTest class Drupal\FunctionalTests\Rest core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayJsonCookieTest.php @group rest
EntityFormDisplayResourceTestBase abstract class Drupal\FunctionalTests\Rest core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayResourceTestBase.php 9 3
EntityFormDisplayTest class Drupal\Tests\field_ui\Kernel core/modules/field_ui/tests/src/Kernel/EntityFormDisplayTest.php Tests the entity display configuration entities.
EntityFormDisplayTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/EntityFormDisplayTest.php JSON:API integration test for the "EntityFormDisplay" config entity type.
EntityFormDisplayXmlAnonTest class Drupal\FunctionalTests\Rest core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlAnonTest.php @group rest
EntityFormDisplayXmlBasicAuthTest class Drupal\FunctionalTests\Rest core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlBasicAuthTest.php @group rest
EntityFormDisplayXmlCookieTest class Drupal\FunctionalTests\Rest core/tests/Drupal/FunctionalTests/Rest/EntityFormDisplayXmlCookieTest.php @group rest
EntityFormInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/EntityFormInterface.php Defines an interface for entity form classes. 2 2
EntityFormMode class Drupal\Core\Entity\Entity core/lib/Drupal/Core/Entity/Entity/EntityFormMode.php Defines the entity form mode configuration entity class. 9

Other projects


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