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
FieldInstancePerFormDisplayTest class Drupal\Tests\field\Kernel\Plugin\migrate\source\d7 core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstancePerFormDisplayTest.php Tests D7 field instance per form display source plugin.
FieldInstancePerViewMode class Drupal\field\Plugin\migrate\source\d6 core/modules/field/src/Plugin/migrate/source/d6/FieldInstancePerViewMode.php Drupal 6 field instance per view mode source from database.
FieldInstancePerViewMode class Drupal\field\Plugin\migrate\source\d7 core/modules/field/src/Plugin/migrate/source/d7/FieldInstancePerViewMode.php Drupal 7 field instance per view mode source class.
FieldInstancePerViewModeTest class Drupal\Tests\field\Kernel\Plugin\migrate\source\d6 core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstancePerViewModeTest.php Tests D6 fields per view mode source plugin.
FieldInstancePerViewModeTest class Drupal\Tests\field\Kernel\Plugin\migrate\source\d7 core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstancePerViewModeTest.php Tests D7 field instance per view mode source plugin.
FieldInstanceSettings class Drupal\field\Plugin\migrate\process\d6 core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceSettings.php Plugin annotation @MigrateProcessPlugin( id = "d6_field_field_settings" ) 1
FieldInstanceSettings class Drupal\field\Plugin\migrate\process\d7 core/modules/field/src/Plugin/migrate/process/d7/FieldInstanceSettings.php Plugin annotation @MigrateProcessPlugin( id = "d7_field_instance_settings" ) 1
FieldInstanceSettingsTest class Drupal\Tests\field\Unit\Plugin\migrate\process\d6 core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldInstanceSettingsTest.php @coversDefaultClass \Drupal\field\Plugin\migrate\process\d6\FieldInstanceSettings @group field
FieldInstanceSettingsTest class Drupal\Tests\field\Unit\Plugin\migrate\process\d7 core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldInstanceSettingsTest.php @coversDefaultClass \Drupal\field\Plugin\migrate\process\d7\FieldInstanceSettings @group field
FieldInstanceTest class Drupal\Tests\field\Kernel\Plugin\migrate\source\d6 core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceTest.php Tests D6 field instance source plugin.
FieldInstanceTest class Drupal\Tests\field\Kernel\Plugin\migrate\source\d7 core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstanceTest.php Tests D7 field instance source plugin.
FieldInstanceWidgetSettings class Drupal\field\Plugin\migrate\process\d6 core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceWidgetSettings.php Get the field instance widget settings.
FieldItem abstract class Drupal\Core\Field\Plugin\DataType core/lib/Drupal/Core/Field/Plugin/DataType/FieldItem.php Defines the base plugin for deriving data types for field types.
FieldItemBase abstract class Drupal\Core\Field core/lib/Drupal/Core/Field/FieldItemBase.php An entity field item. 24 26
FieldItemDataDefinition class Drupal\Core\Field\TypedData core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinition.php A typed data definition class for defining field items. 6
FieldItemDataDefinitionInterface interface Drupal\Core\Field\TypedData core/lib/Drupal/Core/Field/TypedData/FieldItemDataDefinitionInterface.php Interface for field item data definitions. 1 3
FieldItemDeriver class Drupal\Core\Field\Plugin\DataType\Deriver core/lib/Drupal/Core/Field/Plugin/DataType/Deriver/FieldItemDeriver.php Provides data type plugins for each existing field type plugin.
FieldItemInterface interface Drupal\Core\Field core/lib/Drupal/Core/Field/FieldItemInterface.php Interface for entity field items. 2 36
FieldItemList class Drupal\Core\Field core/lib/Drupal/Core/Field/FieldItemList.php Represents an entity field; that is, a list of field item objects. 10 12
FieldItemListInterface interface Drupal\Core\Field core/lib/Drupal/Core/Field/FieldItemListInterface.php Interface for fields, being lists of field items. 2 160
FieldItemListTest class Drupal\Tests\Core\Field core/tests/Drupal/Tests/Core/Field/FieldItemListTest.php @coversDefaultClass \Drupal\Core\Field\FieldItemList @group Field
FieldItemNormalizer class Drupal\hal\Normalizer core/modules/hal/src/Normalizer/FieldItemNormalizer.php Converts the Drupal field item object structure to HAL array structure. 2 1 2
FieldItemNormalizer class Drupal\jsonapi\Normalizer core/modules/jsonapi/src/Normalizer/FieldItemNormalizer.php Converts the Drupal field item object to a JSON:API array structure. 1 2
FieldItemNormalizer class Drupal\serialization\Normalizer core/modules/serialization/src/Normalizer/FieldItemNormalizer.php Denormalizes field item object structure by updating the entity field values. 5 3 2
FieldItemNormalizerTest class Drupal\Tests\jsonapi\Kernel\Normalizer core/modules/jsonapi/tests/src/Kernel/Normalizer/FieldItemNormalizerTest.php @coversDefaultClass \Drupal\jsonapi\Normalizer\FieldItemNormalizer @group jsonapi
FieldItemSerializationTest class Drupal\Tests\serialization\Kernel core/modules/serialization/tests/src/Kernel/FieldItemSerializationTest.php Test field level normalization process.
FieldItemSerializationTest class Drupal\Tests\hal\Kernel\serialization core/modules/hal/tests/src/Kernel/serialization/FieldItemSerializationTest.php Test field level normalization process.
FieldItemTest class Drupal\KernelTests\Core\Field core/tests/Drupal/KernelTests/Core/Field/FieldItemTest.php Test field item methods.
FieldKernelTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/FieldKernelTest.php Tests the generic field handler.
FieldKernelTestBase abstract class Drupal\Tests\field\Kernel core/modules/field/tests/src/Kernel/FieldKernelTestBase.php Parent class for Field API unit tests. 43 21
FieldLabelDescriptionTranslation class Drupal\field\Plugin\migrate\source\d6 core/modules/field/src/Plugin/migrate/source/d6/FieldLabelDescriptionTranslation.php Drupal 6 i18n field label and description source from database.
FieldLabelDescriptionTranslation class Drupal\field\Plugin\migrate\source\d7 core/modules/field/src/Plugin/migrate/source/d7/FieldLabelDescriptionTranslation.php Drupal 7 i18n field label and description source from database.
FieldLanguageTest class Drupal\Tests\language\Kernel\Views core/modules/language/tests/src/Kernel/Views/FieldLanguageTest.php Tests the field language handler.
FieldLayoutBuilder class Drupal\field_layout core/modules/field_layout/src/FieldLayoutBuilder.php Builds a field layout. 2
FieldLayoutBuilderTest class Drupal\Tests\field_layout\Unit core/modules/field_layout/tests/src/Unit/FieldLayoutBuilderTest.php @coversDefaultClass \Drupal\field_layout\FieldLayoutBuilder @group field_layout
FieldLayoutEntityDisplayFormTrait trait Drupal\field_layout\Form core/modules/field_layout/src/Form/FieldLayoutEntityDisplayFormTrait.php Provides shared code for entity display forms.
FieldLayoutEntityDisplayTest class Drupal\Tests\field_layout\Kernel core/modules/field_layout/tests/src/Kernel/FieldLayoutEntityDisplayTest.php @coversDefaultClass \Drupal\field_layout\Entity\FieldLayoutEntityDisplayTrait @group field_layout
FieldLayoutEntityDisplayTrait trait Drupal\field_layout\Entity core/modules/field_layout/src/Entity/FieldLayoutEntityDisplayTrait.php Provides shared code for entity displays.
FieldLayoutEntityFormDisplay class Drupal\field_layout\Entity core/modules/field_layout/src/Entity/FieldLayoutEntityFormDisplay.php Provides an entity form display entity that has a layout. 1
FieldLayoutEntityFormDisplayEditForm class Drupal\field_layout\Form core/modules/field_layout/src/Form/FieldLayoutEntityFormDisplayEditForm.php Edit form for the EntityFormDisplay entity type. 1
FieldLayoutEntityViewDisplay class Drupal\field_layout\Entity core/modules/field_layout/src/Entity/FieldLayoutEntityViewDisplay.php Provides an entity view display entity that has a layout. 2
FieldLayoutEntityViewDisplayEditForm class Drupal\field_layout\Form core/modules/field_layout/src/Form/FieldLayoutEntityViewDisplayEditForm.php Edit form for the EntityViewDisplay entity type. 1
FieldLayoutTest class Drupal\Tests\field_layout\FunctionalJavascript core/modules/field_layout/tests/src/FunctionalJavascript/FieldLayoutTest.php Tests using field layout for entity displays.
FieldLayoutTest class Drupal\Tests\field_layout\Functional core/modules/field_layout/tests/src/Functional/FieldLayoutTest.php Tests using field layout for entity displays.
FieldLayoutUninstallTest class Drupal\Tests\field_layout\Kernel core/modules/field_layout/tests/src/Kernel/FieldLayoutUninstallTest.php @group field_layout
FieldLink class Drupal\link\Plugin\migrate\process core/modules/link/src/Plugin/migrate/process/FieldLink.php Transform a pre-Drupal 8 formatted link for use in Drupal 8. 1
FieldLinkTest class Drupal\Tests\link\Unit\Plugin\migrate\process core/modules/link/tests/src/Unit/Plugin/migrate/process/FieldLinkTest.php @group Link
FieldMigration class Drupal\migrate_drupal\Plugin\migrate core/modules/migrate_drupal/src/Plugin/migrate/FieldMigration.php Migration plugin class for migrations dealing with field config and values. 2 2 9
FieldMissingTypeTest class Drupal\KernelTests\Core\Field core/tests/Drupal/KernelTests/Core/Field/FieldMissingTypeTest.php Tests the exception when missing a field type.
FieldNormalizer class Drupal\jsonapi\Normalizer core/modules/jsonapi/src/Normalizer/FieldNormalizer.php Converts the Drupal field structure to a JSON:API array structure. 1 2

Other projects


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