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
FieldDiscoveryTestClass class Drupal\field_discovery_test core/modules/migrate_drupal/tests/modules/field_discovery_test/src/FieldDiscoveryTestClass.php A test class to expose protected methods. 4
FieldDiscoveryTestTrait trait Drupal\Tests\migrate_drupal\Traits core/modules/migrate_drupal/tests/src/Traits/FieldDiscoveryTestTrait.php Helper functions to test field discovery. 2
FieldDisplayTest class Drupal\Tests\field\Kernel core/modules/field/tests/src/Kernel/FieldDisplayTest.php Tests Field display.
FieldDropbuttonTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/FieldDropbuttonTest.php Tests the core Drupal\views\Plugin\views\field\Dropbutton handler.
FieldDropButtonTest class Drupal\Tests\views\Functional\Handler core/modules/views/tests/src/Functional/Handler/FieldDropButtonTest.php Tests the dropbutton field handler.
FieldEntityLinkBaseTest class Drupal\Tests\views\Functional\Handler core/modules/views/tests/src/Functional/Handler/FieldEntityLinkBaseTest.php Tests the core Drupal\views\Plugin\views\field\LinkBase handler.
FieldEntityLinkTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/FieldEntityLinkTest.php Tests the core Drupal\views\Plugin\views\field\EntityOperations handler.
FieldEntityOperationsTest class Drupal\Tests\views\Functional\Handler core/modules/views/tests/src/Functional/Handler/FieldEntityOperationsTest.php Tests the core Drupal\views\Plugin\views\field\EntityOperations handler.
FieldEntityTest class Drupal\Tests\views\Functional\Entity core/modules/views/tests/src/Functional/Entity/FieldEntityTest.php Tests the field plugin base integration with the entity system.
FieldEntityTranslationTest class Drupal\Tests\views\Functional\Entity core/modules/views/tests/src/Functional/Entity/FieldEntityTranslationTest.php Tests the rendering of fields (base fields) and their translations.
FieldException class Drupal\Core\Field core/lib/Drupal/Core/Field/FieldException.php Base class for all exceptions thrown by the Entity Field API functions. 1 11
FieldFieldAccessTestBase abstract class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/FieldFieldAccessTestBase.php Provides a base class for base field access in views. 8 7
FieldFieldTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/FieldFieldTest.php Provides some integration tests for the Field handler.
FieldFile class Drupal\file\Plugin\migrate\process\d6 core/modules/file/src/Plugin/migrate/process/d6/FieldFile.php Plugin annotation @MigrateProcessPlugin( id = "d6_field_file" ) 1
FieldFileSizeTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/FieldFileSizeTest.php Tests the core Drupal\views\Plugin\views\field\FileSize handler.
FieldFileTest class Drupal\Tests\file\Unit\Plugin\migrate\process\d6 core/modules/file/tests/src/Unit/Plugin/migrate/process/d6/FieldFileTest.php @group file
FieldFilteredMarkup final class Drupal\Core\Field core/lib/Drupal/Core/Field/FieldFilteredMarkup.php Defines an object that passes safe strings through the Field system. 12
FieldFilteredMarkupTest class Drupal\Tests\Core\Field core/tests/Drupal/Tests/Core/Field/FieldFilteredMarkupTest.php @coversDefaultClass \Drupal\Core\Field\FieldFilteredMarkup @group Field
FieldFormatter class Drupal\Core\Field\Annotation core/lib/Drupal/Core/Field/Annotation/FieldFormatter.php Defines a FieldFormatter annotation object.
FieldFormatterSettingsDefaults class Drupal\field\Plugin\migrate\process\d6 core/modules/field/src/Plugin/migrate/process/d6/FieldFormatterSettingsDefaults.php Set the default field settings.
FieldFormatterTest class Drupal\Tests\field\Kernel core/modules/field/tests/src/Kernel/FieldFormatterTest.php Tests for field formatters.
FieldFormButtonTest class Drupal\views_test_data\Plugin\views\field core/modules/views/tests/modules/views_test_data/src/Plugin/views/field/FieldFormButtonTest.php A handler to provide a field that is completely custom by the administrator.
FieldFormCommand class Drupal\quickedit\Ajax core/modules/quickedit/src/Ajax/FieldFormCommand.php Passes a rendered field form to Quick Edit's JavaScript app. 1
FieldFormSavedCommand class Drupal\quickedit\Ajax core/modules/quickedit/src/Ajax/FieldFormSavedCommand.php Indicates a field was saved and passes the rerendered field to Quick Edit. 1
FieldFormValidationErrorsCommand class Drupal\quickedit\Ajax core/modules/quickedit/src/Ajax/FieldFormValidationErrorsCommand.php Passes validation errors when saving a form field failed. 1
Fieldgroup class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/Fieldgroup.php Provides a render element for a group of form elements.
FieldGroupRowsTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/FieldGroupRowsTest.php Tests the "Display all values in the same row" setting.
FieldGroupRowsWebTest class Drupal\Tests\views\Functional\Handler core/modules/views/tests/src/Functional/Handler/FieldGroupRowsWebTest.php Tests the "Display all values in the same row" setting.
FieldHandlerInterface interface Drupal\views\Plugin\views\field core/modules/views/src/Plugin/views/field/FieldHandlerInterface.php Base field handler that has no options and renders an unformatted field. 2
FieldHelpTest class Drupal\Tests\field\Functional core/modules/field/tests/src/Functional/FieldHelpTest.php Tests help display for the Field module.
FieldImportChangeTest class Drupal\Tests\field\Kernel core/modules/field/tests/src/Kernel/FieldImportChangeTest.php Update field storage and fields during config change method invocation.
FieldImportCreateTest class Drupal\Tests\field\Kernel core/modules/field/tests/src/Kernel/FieldImportCreateTest.php Create field storages and fields during config create method invocation.
FieldImportDeleteTest class Drupal\Tests\field\Kernel core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php Delete field storages and fields during config delete method invocation.
FieldImportDeleteUninstallTest class Drupal\Tests\field\Kernel core/modules/field/tests/src/Kernel/FieldImportDeleteUninstallTest.php Tests field storages and fields deletion during config synchronization.
FieldImportDeleteUninstallUiTest class Drupal\Tests\field\Functional core/modules/field/tests/src/Functional/FieldImportDeleteUninstallUiTest.php Tests deleting field storage when a module in uninstalled through the UI.
FieldInputValueNormalizerTrait trait Drupal\Core\Field core/lib/Drupal/Core/Field/FieldInputValueNormalizerTrait.php A trait used to assist in the normalization of raw input field values. 1
FieldInputValueNormalizerTraitTest class Drupal\Tests\Core\Field core/tests/Drupal/Tests/Core/Field/FieldInputValueNormalizerTraitTest.php @coversDefaultClass \Drupal\Core\Field\FieldInputValueNormalizerTrait @group Field
FieldInstance class Drupal\field\Plugin\migrate\source\d6 core/modules/field/src/Plugin/migrate/source/d6/FieldInstance.php Drupal 6 field instances source from database. 1
FieldInstance class Drupal\field\Plugin\migrate\source\d7 core/modules/field/src/Plugin/migrate/source/d7/FieldInstance.php Drupal 7 field instances source from database. 3 1
FieldInstanceDefaults class Drupal\field\Plugin\migrate\process\d6 core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceDefaults.php Plugin annotation @MigrateProcessPlugin( id = "d6_field_instance_defaults" )
FieldInstanceDefaults class Drupal\field\Plugin\migrate\process\d7 core/modules/field/src/Plugin/migrate/process/d7/FieldInstanceDefaults.php Plugin annotation @MigrateProcessPlugin( id = "d7_field_instance_defaults" )
FieldInstanceLabelDescriptionTranslationTest class Drupal\Tests\field\Kernel\Plugin\migrate\source\d6 core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceLabelDescriptionTranslationTest.php Tests the field label and description translation source plugin.
FieldInstanceLabelDescriptionTranslationTest class Drupal\Tests\field\Kernel\Plugin\migrate\source\d7 core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldInstanceLabelDescriptionTranslationTest.php Tests the field label and description translation source plugin.
FieldInstanceOptionTranslation class Drupal\field\Plugin\migrate\source\d6 core/modules/field/src/Plugin/migrate/source/d6/FieldInstanceOptionTranslation.php Drupal 6 i18n field instance option labels source from database.
FieldInstanceOptionTranslation class Drupal\field\Plugin\migrate\process\d6 core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceOptionTranslation.php Determines the settings property and translation for boolean fields.
FieldInstanceOptionTranslation class Drupal\field\Plugin\migrate\process\d7 core/modules/field/src/Plugin/migrate/process/d7/FieldInstanceOptionTranslation.php Determines the settings property and translation for boolean fields.
FieldInstanceOptionTranslationTest class Drupal\Tests\field\Kernel\Plugin\migrate\source\d6 core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstanceOptionTranslationTest.php Tests the field instance option translation source plugin.
FieldInstancePerFormDisplay class Drupal\field\Plugin\migrate\source\d6 core/modules/field/src/Plugin/migrate/source/d6/FieldInstancePerFormDisplay.php Drupal 6 field instance per form display source from database.
FieldInstancePerFormDisplay class Drupal\field\Plugin\migrate\source\d7 core/modules/field/src/Plugin/migrate/source/d7/FieldInstancePerFormDisplay.php Drupal 7 field instance per form display source from database.
FieldInstancePerFormDisplayTest class Drupal\Tests\field\Kernel\Plugin\migrate\source\d6 core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldInstancePerFormDisplayTest.php Tests d6_field_instance_per_form_display source plugin.

Other projects


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