Classes, traits, and interfaces - 8.9.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 1511

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
FeedXmlAnonTest class Drupal\Tests\aggregator\Functional\Rest core/modules/aggregator/tests/src/Functional/Rest/FeedXmlAnonTest.php @group rest
FeedXmlBasicAuthTest class Drupal\Tests\aggregator\Functional\Rest core/modules/aggregator/tests/src/Functional/Rest/FeedXmlBasicAuthTest.php @group rest
FeedXmlCookieTest class Drupal\Tests\aggregator\Functional\Rest core/modules/aggregator/tests/src/Functional/Rest/FeedXmlCookieTest.php @group rest
FetcherInterface interface Drupal\aggregator\Plugin core/modules/aggregator/src/Plugin/FetcherInterface.php Defines an interface for aggregator fetcher implementations. 2 2
FetchTest class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/FetchTest.php Tests the Database system's various fetch capabilities.
Fid class Drupal\file\Plugin\views\argument core/modules/file/src/Plugin/views/argument/Fid.php Argument handler to accept multiple file ids.
Fid class Drupal\aggregator\Plugin\views\argument core/modules/aggregator/src/Plugin/views/argument/Fid.php Argument handler to accept an aggregator feed id.
Field

in drupal:8.3.0 and is removed from drupal:9.0.0. Use \Drupal\views\Plugin\views\field\EntityField instead.

class Drupal\views\Plugin\views\field core/modules/views/src/Plugin/views/field/Field.php A stub class to provide backward compatibility for EntityField.
Field class Drupal\field\Plugin\migrate\source\d6 core/modules/field/src/Plugin/migrate/source/d6/Field.php Drupal 6 field source from database. 1
Field class Drupal\field\Plugin\migrate\source\d7 core/modules/field/src/Plugin/migrate/source/d7/Field.php Drupal 7 field source from database. 1
FieldableEntity abstract class Drupal\migrate_drupal\Plugin\migrate\source\d7 core/modules/migrate_drupal/src/Plugin/migrate/source/d7/FieldableEntity.php Base class for D7 source plugins which need to collect field values from the Field API. 8 8
FieldableEntityDefinitionUpdateTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/FieldableEntityDefinitionUpdateTest.php Tests EntityDefinitionUpdateManager's fieldable entity update functionality.
FieldableEntityInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/FieldableEntityInterface.php Interface for entities having fields. 1 92
FieldableEntityNormalizerTrait trait Drupal\serialization\Normalizer core/modules/serialization/src/Normalizer/FieldableEntityNormalizerTrait.php A trait for providing fieldable entity normalization/denormalization methods. 2
FieldableEntityStorageInterface interface Drupal\Core\Entity core/lib/Drupal/Core/Entity/FieldableEntityStorageInterface.php A storage that supports entity types with field definitions. 1 3
FieldAccessTest class Drupal\KernelTests\Core\Field core/tests/Drupal/KernelTests/Core/Field/FieldAccessTest.php Tests Field level access hooks.
FieldAccessTest class Drupal\Tests\field\Functional core/modules/field/tests/src/Functional/FieldAccessTest.php Tests Field access.
FieldApiDataTest class Drupal\Tests\views\Kernel core/modules/views/tests/src/Kernel/FieldApiDataTest.php Tests the Field Views data.
FieldAPIHandlerTrait trait Drupal\views core/modules/views/src/FieldAPIHandlerTrait.php A trait containing helper methods for field definitions. 7
FieldAttachOtherTest class Drupal\Tests\field\Kernel core/modules/field/tests/src/Kernel/FieldAttachOtherTest.php Tests other Field API functions.
FieldAttachStorageTest class Drupal\Tests\field\Kernel core/modules/field/tests/src/Kernel/FieldAttachStorageTest.php Tests storage-related Field Attach API functions.
FieldBlock class Drupal\layout_builder\Plugin\Block core/modules/layout_builder/src/Plugin/Block/FieldBlock.php Provides a block that renders a field from an entity. 1 2
FieldBlock class Drupal\layout_builder_fieldblock_test\Plugin\Block core/modules/layout_builder/tests/modules/layout_builder_fieldblock_test/src/Plugin/Block/FieldBlock.php Provides test field block to test with Block UI.
FieldBlockDeriver class Drupal\layout_builder\Plugin\Derivative core/modules/layout_builder/src/Plugin/Derivative/FieldBlockDeriver.php Provides entity field block definitions for every field.
FieldBlockTest class Drupal\Tests\layout_builder\FunctionalJavascript core/modules/layout_builder/tests/src/FunctionalJavascript/FieldBlockTest.php @coversDefaultClass \Drupal\layout_builder\Plugin\Block\FieldBlock
FieldBlockTest class Drupal\Tests\layout_builder\Kernel core/modules/layout_builder/tests/src/Kernel/FieldBlockTest.php @coversDefaultClass \Drupal\layout_builder\Plugin\Block\FieldBlock @group Field
FieldBooleanTest class Drupal\Tests\views\Kernel\Handler core/modules/views/tests/src/Kernel/Handler/FieldBooleanTest.php Tests the core Drupal\views\Plugin\views\field\Boolean handler.
FieldConfig class Drupal\field\Entity core/modules/field/src/Entity/FieldConfig.php Defines the Field entity. 294
FieldConfigAccessControlHandler class Drupal\field core/modules/field/src/FieldConfigAccessControlHandler.php Defines the access control handler for the field config entity type. 1
FieldConfigAccessControlHandlerTest class Drupal\Tests\field\Unit core/modules/field/tests/src/Unit/FieldConfigAccessControlHandlerTest.php Tests the field config access controller.
FieldConfigBase abstract class Drupal\Core\Field core/lib/Drupal/Core/Field/FieldConfigBase.php Base class for configurable field definitions. 2 2
FieldConfigDeleteForm class Drupal\field_ui\Form core/modules/field_ui/src/Form/FieldConfigDeleteForm.php Provides a form for removing a field from a bundle.
FieldConfigEditForm class Drupal\field_ui\Form core/modules/field_ui/src/Form/FieldConfigEditForm.php Provides a form for the field settings form.
FieldConfigEntityUnitTest class Drupal\Tests\field\Unit core/modules/field/tests/src/Unit/FieldConfigEntityUnitTest.php @coversDefaultClass \Drupal\field\Entity\FieldConfig @group field
FieldConfigHalJsonAnonTest class Drupal\Tests\field\Functional\Hal core/modules/field/tests/src/Functional/Hal/FieldConfigHalJsonAnonTest.php @group hal
FieldConfigHalJsonBasicAuthTest class Drupal\Tests\field\Functional\Hal core/modules/field/tests/src/Functional/Hal/FieldConfigHalJsonBasicAuthTest.php @group hal
FieldConfigHalJsonCookieTest class Drupal\Tests\field\Functional\Hal core/modules/field/tests/src/Functional/Hal/FieldConfigHalJsonCookieTest.php @group hal
FieldConfigInterface interface Drupal\Core\Field core/lib/Drupal/Core/Field/FieldConfigInterface.php Defines an interface for configurable field definitions. 1 4
FieldConfigInterface interface Drupal\field core/modules/field/src/FieldConfigInterface.php Provides an interface defining a field entity. 1 15
FieldConfigJsonAnonTest class Drupal\Tests\field\Functional\Rest core/modules/field/tests/src/Functional/Rest/FieldConfigJsonAnonTest.php @group rest
FieldConfigJsonBasicAuthTest class Drupal\Tests\field\Functional\Rest core/modules/field/tests/src/Functional/Rest/FieldConfigJsonBasicAuthTest.php @group rest
FieldConfigJsonCookieTest class Drupal\Tests\field\Functional\Rest core/modules/field/tests/src/Functional/Rest/FieldConfigJsonCookieTest.php @group rest
FieldConfigListBuilder class Drupal\field_ui core/modules/field_ui/src/FieldConfigListBuilder.php Provides lists of field config entities.
FieldConfigListController class Drupal\field_ui\Controller core/modules/field_ui/src/Controller/FieldConfigListController.php Defines a controller to list field instances.
FieldConfigResourceTestBase

in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\Tests\field\Functional\Rest\FieldConfigResourceTestBase instead.

abstract class Drupal\Tests\rest\Functional\EntityResource\FieldConfig core/modules/rest/tests/src/Functional/EntityResource/FieldConfig/FieldConfigResourceTestBase.php
FieldConfigResourceTestBase abstract class Drupal\Tests\field\Functional\Rest core/modules/field/tests/src/Functional/Rest/FieldConfigResourceTestBase.php 10 4
FieldConfigStorage class Drupal\field core/modules/field/src/FieldConfigStorage.php Storage handler for field config.
FieldConfigStorageBase abstract class Drupal\Core\Field core/lib/Drupal/Core/Field/FieldConfigStorageBase.php Base storage class for field config entities. 2 1
FieldConfigTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/FieldConfigTest.php JSON:API integration test for the "FieldConfig" config entity type.
FieldConfigXmlAnonTest class Drupal\Tests\field\Functional\Rest core/modules/field/tests/src/Functional/Rest/FieldConfigXmlAnonTest.php @group rest

Other projects


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