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
FieldStorageConfigStorage class Drupal\field core/modules/field/src/FieldStorageConfigStorage.php Storage handler for "field storage" configuration entities. 1
FieldStorageConfigTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/FieldStorageConfigTest.php JSON:API integration test for the "FieldStorageConfig" config entity type.
FieldStorageConfigUpdateForbiddenException class Drupal\field core/modules/field/src/FieldStorageConfigUpdateForbiddenException.php Exception class thrown by hook_field_storage_config_update_forbid().
FieldStorageConfigValidationTest class Drupal\Tests\field\Kernel\Entity core/modules/field/tests/src/Kernel/Entity/FieldStorageConfigValidationTest.php Tests validation of field_storage_config entities.
FieldStorageConfigXmlAnonTest class Drupal\Tests\field\Functional\Rest core/modules/field/tests/src/Functional/Rest/FieldStorageConfigXmlAnonTest.php Tests Field Storage Config Xml Anon.
FieldStorageConfigXmlBasicAuthTest class Drupal\Tests\field\Functional\Rest core/modules/field/tests/src/Functional/Rest/FieldStorageConfigXmlBasicAuthTest.php Tests Field Storage Config Xml Basic Auth.
FieldStorageConfigXmlCookieTest class Drupal\Tests\field\Functional\Rest core/modules/field/tests/src/Functional/Rest/FieldStorageConfigXmlCookieTest.php Tests Field Storage Config Xml Cookie.
FieldStorageCreateCheckDeprecationTest class Drupal\KernelTests\Core\Field core/tests/Drupal/KernelTests/Core/Field/FieldStorageCreateCheckDeprecationTest.php Tests the field storage create check subscriber.
FieldStorageCreateCheckSubscriber final class Drupal\Core\Test\EventSubscriber core/lib/Drupal/Core/Test/EventSubscriber/FieldStorageCreateCheckSubscriber.php Response subscriber to field storage events. 2
FieldStorageCreateCheckTest class Drupal\KernelTests\Core\Field core/tests/Drupal/KernelTests/Core/Field/FieldStorageCreateCheckTest.php Tests the field storage create check subscriber.
FieldStorageCreationTrait trait Drupal\field_ui\Form core/modules/field_ui/src/Form/FieldStorageCreationTrait.php Provides common functionality for adding or re-using a field.
FieldStorageCrudTest class Drupal\Tests\field\Kernel core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php Tests field storage create, read, update, and delete.
FieldStorageDefinition class Drupal\entity_test core/modules/system/tests/modules/entity_test/src/FieldStorageDefinition.php A custom field storage definition class. 5
FieldStorageDefinitionEvent class Drupal\Core\Field core/lib/Drupal/Core/Field/FieldStorageDefinitionEvent.php Defines a base class for all field storage definition events. 1
FieldStorageDefinitionEvents final class Drupal\Core\Field core/lib/Drupal/Core/Field/FieldStorageDefinitionEvents.php Contains all events thrown while handling field storage definitions. 3
FieldStorageDefinitionEventSubscriberTrait trait Drupal\Core\Field core/lib/Drupal/Core/Field/FieldStorageDefinitionEventSubscriberTrait.php Helper methods for FieldStorageDefinitionListenerInterface. 1
FieldStorageDefinitionInterface interface Drupal\Core\Field core/lib/Drupal/Core/Field/FieldStorageDefinitionInterface.php Defines an interface for entity field storage definitions. 3 185
FieldStorageDefinitionListener class Drupal\Core\Field core/lib/Drupal/Core/Field/FieldStorageDefinitionListener.php Reacts to field storage definition CRUD on behalf of the Entity system. 2
FieldStorageDefinitionListenerInterface interface Drupal\Core\Field core/lib/Drupal/Core/Field/FieldStorageDefinitionListenerInterface.php Interface for field storage definition create, delete and update operations. 4 4
FieldStorageDefinitionUpdateForbiddenException class Drupal\Core\Entity\Exception core/lib/Drupal/Core/Entity/Exception/FieldStorageDefinitionUpdateForbiddenException.php Exception thrown when a storage definition update is forbidden. 11
FieldStorageEntityTypeDependencyTestHook class Drupal\field_storage_entity_type_dependency_test\Hook core/modules/system/tests/modules/field_storage_entity_type_dependency_test/src/Hook/FieldStorageEntityTypeDependencyTestHook.php Hook implementations.
FieldStorageGetPropertyDefinitionTest class Drupal\KernelTests\Core\Field core/tests/Drupal/KernelTests/Core/Field/FieldStorageGetPropertyDefinitionTest.php Tests getting property definitions from field storages.
FieldStorageIndexesConstraint class Drupal\field\Plugin\Validation\Constraint core/modules/field/src/Plugin/Validation/Constraint/FieldStorageIndexesConstraint.php Validates the structure of field storage index definitions. 1
FieldStorageIndexesConstraintValidator class Drupal\field\Plugin\Validation\Constraint core/modules/field/src/Plugin/Validation/Constraint/FieldStorageIndexesConstraintValidator.php Validates FieldStorageIndexesConstraint. 1
FieldStorageIndexesValidationTest class Drupal\Tests\field\Kernel\Config core/modules/field/tests/src/Kernel/Config/FieldStorageIndexesValidationTest.php Tests validation for field storage indexes config.
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.

Other projects


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