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
FieldLanguageTest class Drupal\Tests\language\Kernel\Views core/modules/language/tests/src/Kernel/Views/FieldLanguageTest.php Tests the field language handler.
FieldLink

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

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 Tests the link field migrate process plugin.
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
FieldNormalizer class Drupal\serialization\Normalizer core/modules/serialization/src/Normalizer/FieldNormalizer.php Denormalizes data to Drupal field values. 2
FieldNumericTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/FieldNumericTest.php Tests the core Drupal\views\Plugin\views\field\Numeric handler.
FieldOptionTranslation class Drupal\field\Plugin\migrate\source\d6 core/modules/field/src/Plugin/migrate/source/d6/FieldOptionTranslation.php Drupal 6 i18n field option labels source from database. 1 1
FieldOptionTranslation class Drupal\field\Plugin\migrate\source\d7 core/modules/field/src/Plugin/migrate/source/d7/FieldOptionTranslation.php Drupal 7 i18n field option label source from database. 1
FieldOptionTranslation

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/FieldOptionTranslation.php Determines the allowed values translation for select lists.
FieldOptionTranslation

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/FieldOptionTranslation.php Determines the allowed values translation for select lists.
FieldOptionTranslationTest class Drupal\Tests\field\Kernel\Plugin\migrate\source\d6 core/modules/field/tests/src/Kernel/Plugin/migrate/source/d6/FieldOptionTranslationTest.php Tests the field option translation source plugin. 1
FieldOptionTranslationTest class Drupal\Tests\field\Kernel\Plugin\migrate\source\d7 core/modules/field/tests/src/Kernel/Plugin/migrate/source/d7/FieldOptionTranslationTest.php Tests the field option translation source plugin.
FieldOrLanguageJoin class Drupal\views\Plugin\views\join core/modules/views/src/Plugin/views/join/FieldOrLanguageJoin.php Implementation for the "field OR language" join. 1
FieldOrLanguageJoinTest class Drupal\Tests\views\Kernel\Plugin core/modules/views/tests/src/Kernel/Plugin/FieldOrLanguageJoinTest.php Tests the "field OR language" join plugin.
FieldPluginBase abstract class Drupal\views\Plugin\views\field core/modules/views/src/Plugin/views/field/FieldPluginBase.php Base class for views fields. 34 13
FieldPluginBase abstract class Drupal\migrate_drupal\Plugin\migrate\field core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php The base class for all field plugins. 18 17
FieldPluginBaseTest class Drupal\Tests\views\Unit\Plugin\field core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php Tests Drupal\views\Plugin\views\field\FieldPluginBase.
FieldPluginBaseTestField class Drupal\Tests\views\Unit\Plugin\field core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php Test class for testing field plugins.
FieldPreprocess class Drupal\Core\Field core/lib/Drupal/Core/Field/FieldPreprocess.php Field theme preprocess. 1 2
FieldPurger class Drupal\Core\Field core/lib/Drupal/Core/Field/FieldPurger.php 12
FieldRenderedEntityTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/FieldRenderedEntityTest.php Tests the core Drupal\views\Plugin\views\field\RenderedEntity handler.
FieldRenderedEntityTranslationTest class Drupal\Tests\views\Functional\Entity core/modules/views/tests/src/Functional/Entity/FieldRenderedEntityTranslationTest.php Tests the rendering of the 'rendered_entity' field and translations.
FieldResolver class Drupal\jsonapi\Context core/modules/jsonapi/src/Context/FieldResolver.php A service that evaluates external path expressions against Drupal fields. 5 2
FieldResolverTest class Drupal\Tests\jsonapi\Kernel\Context core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php Tests Drupal\jsonapi\Context\FieldResolver.
FieldReuseAccessCheck class Drupal\field_ui\Access core/modules/field_ui/src/Access/FieldReuseAccessCheck.php Defines an access check for the reuse existing fields form. 2
Fields class Drupal\views\Plugin\views\row core/modules/views/src/Plugin/views/row/Fields.php The basic 'fields' row plugin. 1 2
FieldSelfTokensTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/FieldSelfTokensTest.php Tests token escaping in the EntityField handler.
Fieldset class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/Fieldset.php Provides a render element for a group of form elements. 1
FieldSettings

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/FieldSettings.php Get the field settings. 1
FieldSettings

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/FieldSettings.php Determines the field settings values for a field. 1
FieldSettingsTest class Drupal\Tests\field\Unit\Plugin\migrate\process\d6 core/modules/field/tests/src/Unit/Plugin/migrate/process/d6/FieldSettingsTest.php Tests Drupal\field\Plugin\migrate\process\d6\FieldSettings.
FieldSettingsTest class Drupal\Tests\field\Unit\Plugin\migrate\process\d7 core/modules/field/tests/src/Unit/Plugin/migrate/process/d7/FieldSettingsTest.php Tests Drupal\field\Plugin\migrate\process\d7\FieldSettings.
FieldSettingsTest class Drupal\KernelTests\Core\Field core/tests/Drupal/KernelTests/Core/Field/FieldSettingsTest.php Tests field settings methods on field definition structures.
FieldsOverlapException class Drupal\Core\Database\Query core/lib/Drupal/Core/Database/Query/FieldsOverlapException.php Exception thrown if an insert query specifies a field twice.
FieldSqlStorageTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/FieldSqlStorageTest.php Tests Field SQL Storage .
FieldStorageAddController final class Drupal\field_ui\Controller core/modules/field_ui/src/Controller/FieldStorageAddController.php Controller for building the field type links. 1
FieldStorageAddForm class Drupal\field_ui\Form core/modules/field_ui/src/Form/FieldStorageAddForm.php Provides a form for the "field storage" add subform.
FieldStorageConfig class Drupal\field\Entity core/modules/field/src/Entity/FieldStorageConfig.php Defines the Field storage configuration entity. 333
FieldStorageConfigAccessControlHandler class Drupal\field core/modules/field/src/FieldStorageConfigAccessControlHandler.php Defines the access control handler for the field storage config entity type. 2
FieldStorageConfigAccessControlHandlerTest class Drupal\Tests\field\Unit core/modules/field/tests/src/Unit/FieldStorageConfigAccessControlHandlerTest.php Tests the field storage config access controller. 1
FieldStorageConfigEditForm class Drupal\field_ui\Form core/modules/field_ui/src/Form/FieldStorageConfigEditForm.php Provides a form for the "field storage" edit page. 2
FieldStorageConfigEntityUnitTest class Drupal\Tests\field\Unit core/modules/field/tests/src/Unit/FieldStorageConfigEntityUnitTest.php Tests Drupal\field\Entity\FieldStorageConfig.
FieldStorageConfigInterface interface Drupal\field core/modules/field/src/FieldStorageConfigInterface.php Provides an interface defining a field storage entity. 1 33
FieldStorageConfigJsonAnonTest class Drupal\Tests\field\Functional\Rest core/modules/field/tests/src/Functional/Rest/FieldStorageConfigJsonAnonTest.php Tests Field Storage Config Json Anon.
FieldStorageConfigJsonBasicAuthTest class Drupal\Tests\field\Functional\Rest core/modules/field/tests/src/Functional/Rest/FieldStorageConfigJsonBasicAuthTest.php Tests Field Storage Config Json Basic Auth.
FieldStorageConfigJsonCookieTest class Drupal\Tests\field\Functional\Rest core/modules/field/tests/src/Functional/Rest/FieldStorageConfigJsonCookieTest.php Tests Field Storage Config Json Cookie.
FieldStorageConfigListBuilder class Drupal\field_ui core/modules/field_ui/src/FieldStorageConfigListBuilder.php Defines a class to build a listing of fields.
FieldStorageConfigResourceTestBase abstract class Drupal\Tests\field\Functional\Rest core/modules/field/tests/src/Functional/Rest/FieldStorageConfigResourceTestBase.php Resource test base for the FieldStorageConfig entity. 6

Other projects


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