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
FieldStorageReuseForm class Drupal\field_ui\Form core/modules/field_ui/src/Form/FieldStorageReuseForm.php Provides a form for the "field storage" add page.
FieldSyncWidget class Drupal\content_translation core/modules/content_translation/src/FieldSyncWidget.php Field Sync Widget for content_translation. 2
FieldTest class Drupal\Tests\views\FunctionalJavascript\Plugin\views\Handler core/modules/views/tests/src/FunctionalJavascript/Plugin/views/Handler/FieldTest.php Tests the field handler UI.
FieldTest class Drupal\views_test_data\Plugin\views\field core/modules/views/tests/modules/views_test_data/src/Plugin/views/field/FieldTest.php A test field handler.
FieldTest class Drupal\Tests\views\Unit\Plugin\field core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php Tests Drupal\views\Plugin\views\field\EntityField.
FieldTest class Drupal\Tests\field\Kernel\Plugin\migrate\source\d6 core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldTest.php Tests D6 field source plugin.
FieldTest class Drupal\Tests\field\Kernel\Plugin\migrate\source\d7 core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldTest.php Tests D7 field source plugin.
FieldTestBase abstract class Drupal\Tests\field\Functional\Views core/modules/field/tests/src/Functional/Views/FieldTestBase.php Provides some helper methods for testing fieldapi integration into views. 1
FieldTestBase abstract class Drupal\Tests\field\Functional core/modules/field/tests/src/Functional/FieldTestBase.php Parent class for Field API tests. 10 4
FieldTestBooleanAccessDeniedHooks class Drupal\field_test_boolean_access_denied\Hook core/modules/field/tests/modules/field_test_boolean_access_denied/src/Hook/FieldTestBooleanAccessDeniedHooks.php Hook implementations for field_test_boolean_access_denied.
FieldTestEntityField class Drupal\Tests\views\Unit\Plugin\field core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php Stub class for testing EntityField methods.
FieldTestEntityHooks class Drupal\field_test\Hook core/modules/field/tests/modules/field_test/src/Hook/FieldTestEntityHooks.php Hook implementations for field_test.
FieldTestFieldHooks class Drupal\field_test\Hook core/modules/field/tests/modules/field_test/src/Hook/FieldTestFieldHooks.php Hook implementations for field_test.
FieldTestHelper class Drupal\field_test core/modules/field/tests/modules/field_test/src/FieldTestHelper.php Helper class for testing fields. 9
FieldTestHooks class Drupal\field_test\Hook core/modules/field/tests/modules/field_test/src/Hook/FieldTestHooks.php Hook implementations for field_test.
FieldTestItem class Drupal\entity_test\Plugin\Field\FieldType core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/FieldTestItem.php Defines the 'field_test' entity field type. 1 1
FieldThirdPartyTestHooks class Drupal\field_third_party_test\Hook core/modules/field/tests/modules/field_third_party_test/src/Hook/FieldThirdPartyTestHooks.php Hook implementations for field_third_party_test.
FieldTimeIntervalTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/FieldTimeIntervalTest.php Tests the time interval handler.
FieldTranslationSqlStorageTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/FieldTranslationSqlStorageTest.php Tests Field translation SQL Storage.
FieldTranslationSynchronizer class Drupal\content_translation core/modules/content_translation/src/FieldTranslationSynchronizer.php Provides field translation synchronization capabilities. 1 2
FieldTranslationSynchronizerInterface interface Drupal\content_translation core/modules/content_translation/src/FieldTranslationSynchronizerInterface.php Provides field translation synchronization capabilities. 1 1
FieldType class Drupal\Core\Field\Attribute core/lib/Drupal/Core/Field/Attribute/FieldType.php Defines a FieldType attribute. 57
FieldType class Drupal\Core\Field\Annotation core/lib/Drupal/Core/Field/Annotation/FieldType.php Defines a FieldType annotation object.
FieldType

in drupal:11.3.0 and is removed from drupal:12.0.0. There is no replacement.

class Drupal\field\Plugin\migrate\process core/modules/field/src/Plugin/migrate/process/FieldType.php Determines the field type for a field.
FieldTypeCategoriesIntegrationTest class Drupal\Tests\field_ui\Functional core/modules/field_ui/tests/src/Functional/FieldTypeCategoriesIntegrationTest.php Tests field UI integration with field type categories for loading libraries.
FieldTypeCategory class Drupal\Core\Field core/lib/Drupal/Core/Field/FieldTypeCategory.php Default object used for field_type_categories plugins. 1
FieldTypeCategoryDiscoveryTest class Drupal\Tests\field\Kernel core/modules/field/tests/src/Kernel/FieldTypeCategoryDiscoveryTest.php Tests discovery of field type categories provided by modules.
FieldTypeCategoryInterface interface Drupal\Core\Field core/lib/Drupal/Core/Field/FieldTypeCategoryInterface.php Provides an object that returns the category info about the field type. 1
FieldTypeCategoryManager class Drupal\Core\Field core/lib/Drupal/Core/Field/FieldTypeCategoryManager.php Defines a field type category info plugin manager. 2
FieldTypeCategoryManagerInterface interface Drupal\Core\Field core/lib/Drupal/Core/Field/FieldTypeCategoryManagerInterface.php Defines an interface for field type category managers. 1 8
FieldTypeDefaults

in drupal:11.3.0 and is removed from drupal:12.0.0. There is no replacement.

class Drupal\field\Plugin\migrate\process\d6 core/modules/field/src/Plugin/migrate/process/d6/FieldTypeDefaults.php Gives us a chance to set per field defaults. 1
FieldTypeDefaults

in drupal:11.3.0 and is removed from drupal:12.0.0. There is no replacement.

class Drupal\field\Plugin\migrate\process\d7 core/modules/field/src/Plugin/migrate/process/d7/FieldTypeDefaults.php Gives us a chance to set per field defaults. 1
FieldTypeDefaultsTest class Drupal\Tests\field\Unit\Plugin\migrate\process\d6 core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldTypeDefaultsTest.php Tests D6 fields defaults.
FieldTypeDefaultsTest class Drupal\Tests\field\Unit\Plugin\migrate\process\d7 core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldTypeDefaultsTest.php Tests D7 field formatter defaults.
FieldTypePluginManager class Drupal\Core\Field core/lib/Drupal/Core/Field/FieldTypePluginManager.php Plugin manager for 'field type' plugins. 4 2
FieldTypePluginManagerInterface interface Drupal\Core\Field core/lib/Drupal/Core/Field/FieldTypePluginManagerInterface.php Defines an interface for the field type plugin manager. 1 41
FieldTypePluginManagerTest class Drupal\Tests\field\Kernel core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php Tests the field type manager.
FieldTypePluginManagerTest class Drupal\Tests\Core\Field core/tests/Drupal/Tests/Core/Field/FieldTypePluginManagerTest.php Tests Drupal\Core\Field\FieldTypePluginManager.
FieldTypeTest class Drupal\Tests\block_content\Kernel\Views core/modules/block_content/tests/src/Kernel/Views/FieldTypeTest.php Tests the Drupal\block_content\Plugin\views\field\Type handler.
FieldUI class Drupal\field_ui core/modules/field_ui/src/FieldUI.php Static service container wrapper for Field UI. 13
FieldUIDeleteTest class Drupal\Tests\field_ui\Functional core/modules/field_ui/tests/src/Functional/FieldUIDeleteTest.php Tests deletion of a field and their dependencies in the UI.
FieldUiHooks class Drupal\field_ui\Hook core/modules/field_ui/src/Hook/FieldUiHooks.php Hook implementations for field_ui. 1
FieldUIIndentationTest class Drupal\Tests\field_ui\Functional core/modules/field_ui/tests/src/Functional/FieldUIIndentationTest.php Tests indentation on Field UI.
FieldUiIntegrationTest class Drupal\Tests\media_library\FunctionalJavascript core/modules/media_library/tests/src/FunctionalJavascript/FieldUiIntegrationTest.php Tests field UI integration for media library widget.
FieldUiJSTestTrait trait Drupal\Tests\field_ui\Traits core/modules/field_ui/tests/src/Traits/FieldUiJSTestTrait.php Provides common functionality for the Field UI tests that depend on JS. 7
FieldUiLocalAction class Drupal\field_ui\Plugin\Derivative core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalAction.php Provides local action definitions for all entity bundles. 1
FieldUiLocalTask class Drupal\field_ui\Plugin\Derivative core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalTask.php Provides local task definitions for all entity bundles. 1 1
FieldUiPermissions class Drupal\field_ui core/modules/field_ui/src/FieldUiPermissions.php Provides dynamic permissions of the field_ui module.
FieldUIRouteTest class Drupal\Tests\field_ui\Functional core/modules/field_ui/tests/src/Functional/FieldUIRouteTest.php Tests the functionality of the Field UI route subscriber.
FieldUiTable class Drupal\field_ui\Element core/modules/field_ui/src/Element/FieldUiTable.php Provides a field_ui table element. 1

Other projects


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