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
FieldStorageConfigXmlBasicAuthTest class Drupal\Tests\field\Functional\Rest core/modules/field/tests/src/Functional/Rest/FieldStorageConfigXmlBasicAuthTest.php @group rest
FieldStorageConfigXmlCookieTest class Drupal\Tests\field\Functional\Rest core/modules/field/tests/src/Functional/Rest/FieldStorageConfigXmlCookieTest.php @group rest
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. 4
FieldStorageDefinitionEvent class Drupal\Core\Field core/lib/Drupal/Core/Field/FieldStorageDefinitionEvent.php Defines a base class for all field storage definition events.
FieldStorageDefinitionEvents final class Drupal\Core\Field core/lib/Drupal/Core/Field/FieldStorageDefinitionEvents.php Contains all events thrown while handling field storage definitions. 2
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 168
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 Defines an interface for reacting to field storage definition creation, deletion, and updates. 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. 8
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.
FieldTest class Drupal\Tests\views\Unit\Plugin\field core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php @coversDefaultClass \Drupal\views\Plugin\views\field\EntityField @group views
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 Plugin annotation @ViewsField("test_field");
FieldTest class Drupal\Tests\quickedit\FunctionalJavascript core/modules/quickedit/tests/src/FunctionalJavascript/FieldTest.php Tests quickedit.
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. 9 4
FieldTestEntityField class Drupal\Tests\views\Unit\Plugin\field core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php
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.
FieldTimeIntervalTest class Drupal\Tests\views\Functional\Handler core/modules/views/tests/src/Functional/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\Annotation core/lib/Drupal/Core/Field/Annotation/FieldType.php Defines a FieldType annotation object.
FieldType class Drupal\field\Plugin\migrate\process core/modules/field/src/Plugin/migrate/process/FieldType.php Plugin annotation @MigrateProcessPlugin( id = "field_type" )
FieldTypeDefaults 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 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. 1 2
FieldTypePluginManagerInterface interface Drupal\Core\Field core/lib/Drupal/Core/Field/FieldTypePluginManagerInterface.php Defines an interface for the field type plugin manager. 1 30
FieldTypePluginManagerTest class Drupal\Tests\field\Kernel core/modules/field/tests/src/Kernel/FieldTypePluginManagerTest.php Tests the field type manager.
FieldTypeTest class Drupal\Tests\block_content\Functional\Views core/modules/block_content/tests/src/Functional/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. 11
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.
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.
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.
FieldUiRouteEnhancer

in drupal:9.4.0 and is removed from drupal:10.0.0. Use \Drupal\Core\Entity\Enhancer\EntityBundleRouteEnhancer.

class Drupal\field_ui\Routing core/modules/field_ui/src/Routing/FieldUiRouteEnhancer.php Enhances Field UI routes by adding proper information about the bundle name. 1
FieldUiRouteEnhancerTest class Drupal\Tests\field_ui\Unit core/modules/field_ui/tests/src/Unit/FieldUiRouteEnhancerTest.php @coversDefaultClass \Drupal\field_ui\Routing\FieldUiRouteEnhancer
FieldUiRouteEnhancerTest class Drupal\Tests\field_ui\Kernel core/modules/field_ui/tests/src/Kernel/FieldUiRouteEnhancerTest.php Tests that the service "field_ui.route_enhancer" has been deprecated.
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.
FieldUiTableTest class Drupal\Tests\field_ui\Unit core/modules/field_ui/tests/src/Unit/FieldUiTableTest.php @coversDefaultClass \Drupal\field_ui\Element\FieldUiTable
FieldUiTest class Drupal\Tests\field_ui\Unit core/modules/field_ui/tests/src/Unit/FieldUiTest.php @coversDefaultClass \Drupal\field_ui\FieldUI
FieldUITest class Drupal\Tests\views_ui\Functional core/modules/views_ui/tests/src/Functional/FieldUITest.php Tests the UI of field handlers.

Other projects


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