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
ImageUploadAccessTest class Drupal\Tests\ckeditor5\Functional core/modules/ckeditor5/tests/src/Functional/ImageUploadAccessTest.php Test image upload access.
ImageUploadTest class Drupal\Tests\ckeditor5\Functional core/modules/ckeditor5/tests/src/Functional/ImageUploadTest.php Test image upload. 1
ImageUrlFormatter class Drupal\image\Plugin\Field\FieldFormatter core/modules/image/src/Plugin/Field/FieldFormatter/ImageUrlFormatter.php Plugin implementation of the 'image_url' formatter.
ImageUrlTest class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageUrlTest.php @coversDefaultClass \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image[[api-linebreak]] @group ckeditor5 @internal
ImageViewsDataTest class Drupal\Tests\image\Kernel\Views core/modules/image/tests/src/Kernel/Views/ImageViewsDataTest.php Tests image views data.
ImageWidget class Drupal\image\Plugin\Field\FieldWidget core/modules/image/src/Plugin/Field/FieldWidget/ImageWidget.php Plugin implementation of the 'image_image' widget.
ImmutableConfig class Drupal\Core\Config core/lib/Drupal/Core/Config/ImmutableConfig.php Defines the immutable configuration object. 9
ImmutableConfigException class Drupal\Core\Config core/lib/Drupal/Core/Config/ImmutableConfigException.php Exception throw when an immutable config object is altered. 1
ImmutableConfigTest class Drupal\Tests\Core\Config core/tests/Drupal/Tests/Core/Config/ImmutableConfigTest.php @coversDefaultClass \Drupal\Core\Config\ImmutableConfig[[api-linebreak]] @group Config
ImportableEntityStorageInterface interface Drupal\Core\Config\Entity core/lib/Drupal/Core/Config/Entity/ImportableEntityStorageInterface.php Provides an interface for responding to configuration imports. 1 1
ImportAwareInterface interface Drupal\migrate\Event core/modules/migrate/src/Event/ImportAwareInterface.php Interface for plugins that react to pre- or post-import events. 1
ImportForm class Drupal\locale\Form core/modules/locale/src/Form/ImportForm.php Form constructor for the translation import screen. 1
ImportOpmlTest class Drupal\Tests\aggregator\Functional core/modules/aggregator/tests/src/Functional/ImportOpmlTest.php Tests OPML import.
ImportStorageTransformer final class Drupal\Core\Config core/lib/Drupal/Core/Config/ImportStorageTransformer.php The import storage transformer helps to use the configuration management api. 3 2
ImportStorageTransformerTest class Drupal\KernelTests\Core\Config core/tests/Drupal/KernelTests/Core/Config/ImportStorageTransformerTest.php Tests the import storage transformer.
InaccessibleMenuLink class Drupal\Core\Menu core/lib/Drupal/Core/Menu/InaccessibleMenuLink.php A menu link plugin for wrapping another menu link, in sensitive situations.
InboundPathProcessorInterface interface Drupal\Core\PathProcessor core/lib/Drupal/Core/PathProcessor/InboundPathProcessorInterface.php Defines an interface for classes that process the inbound path. 12 12
IncludedData class Drupal\jsonapi\JsonApiResource core/modules/jsonapi/src/JsonApiResource/IncludedData.php Represents the included member of a JSON:API document. 1 2
IncludeResolver class Drupal\jsonapi core/modules/jsonapi/src/IncludeResolver.php Resolves included resources for an entity or collection of entities. 1 2
IncompleteLibraryDefinitionException class Drupal\Core\Asset\Exception core/lib/Drupal/Core/Asset/Exception/IncompleteLibraryDefinitionException.php Defines a custom exception if a library has no CSS/JS/JS setting specified. 2
IncrementalForm class Drupal\migrate_drupal_ui\Form core/modules/migrate_drupal_ui/src/Form/IncrementalForm.php Migrate Upgrade Incremental form. 1
IndexPhpTest class Drupal\Tests\system\Functional\System core/modules/system/tests/src/Functional/System/IndexPhpTest.php Tests the handling of requests containing 'index.php'.
IndexTid class Drupal\taxonomy\Plugin\views\argument core/modules/taxonomy/src/Plugin/views/argument/IndexTid.php Allow taxonomy term ID(s) as argument.
IndexTidDepth class Drupal\taxonomy\Plugin\views\argument core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php Argument handler for taxonomy terms with depth.
IndexTidDepthModifier class Drupal\taxonomy\Plugin\views\argument core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepthModifier.php Argument handler for to modify depth for a previous term.
InfoAlterTest class Drupal\Tests\system\Kernel\System core/modules/system/tests/src/Kernel/System/InfoAlterTest.php Tests the effectiveness of hook_system_info_alter().
InfoHookDecorator class Drupal\Core\Plugin\Discovery core/lib/Drupal/Core/Plugin/Discovery/InfoHookDecorator.php Allows info hook implementations to enhance discovered plugin definitions. 1
InfoParser class Drupal\Core\Extension core/lib/Drupal/Core/Extension/InfoParser.php Parses extension .info.yml files. 3 2
InfoParserDynamic class Drupal\Core\Extension core/lib/Drupal/Core/Extension/InfoParserDynamic.php Parses dynamic .info.yml files that might change during the page request. 1 2
InfoParserException class Drupal\Core\Extension core/lib/Drupal/Core/Extension/InfoParserException.php An exception thrown by the InfoParser class whilst parsing info.yml files. 3
InfoParserInterface interface Drupal\Core\Extension core/lib/Drupal/Core/Extension/InfoParserInterface.php Interface for classes that parses Drupal's info.yml files. 1 2
InfoParserUnitTest class Drupal\Tests\Core\Extension core/tests/Drupal/Tests/Core/Extension/InfoParserUnitTest.php Tests InfoParser class and exception.
InheritedContextDefinition class Drupal\Tests\Core\Plugin\Fixtures core/tests/Drupal/Tests/Core/Plugin/Fixtures/InheritedContextDefinition.php Inherited class used for testing. 1
InitialStateTest class Drupal\Tests\content_moderation\Kernel core/modules/content_moderation/tests/src/Kernel/InitialStateTest.php Tests the correct initial states are set on install.
InjectedService class Drupal\new_dependency_test core/modules/system/tests/modules/new_dependency_test/src/InjectedService.php Generic service with a dependency on a service defined in a new module. 2
InlineBlock class Drupal\layout_builder\Plugin\Block core/modules/layout_builder/src/Plugin/Block/InlineBlock.php Defines an inline block plugin type. 2
InlineBlockDeriver class Drupal\layout_builder\Plugin\Derivative core/modules/layout_builder/src/Plugin/Derivative/InlineBlockDeriver.php Provides inline block plugin definitions for all custom block types.
InlineBlockEntityOperations class Drupal\layout_builder core/modules/layout_builder/src/InlineBlockEntityOperations.php Defines a class for reacting to entity events related to Inline Blocks. 1
InlineBlockPrivateFilesTest class Drupal\Tests\layout_builder\FunctionalJavascript core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php Test access to private files in block fields on the Layout Builder.
InlineBlockTest class Drupal\Tests\layout_builder\FunctionalJavascript core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php Tests that the inline block feature works correctly.
InlineBlockTestBase abstract class Drupal\Tests\layout_builder\FunctionalJavascript core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php Base class for testing inline blocks. 2
InlineBlockUsage class Drupal\layout_builder core/modules/layout_builder/src/InlineBlockUsage.php Service class to track inline block usage. 1 2
InlineBlockUsageInterface interface Drupal\layout_builder core/modules/layout_builder/src/InlineBlockUsageInterface.php Defines an interface for tracking inline block usage. 1 1
InlineBlockUsageTest class Drupal\Tests\layout_builder\Unit core/modules/layout_builder/tests/src/Unit/InlineBlockUsageTest.php @coversDefaultClass \Drupal\layout_builder\InlineBlockUsage[[api-linebreak]]
InlineFormErrorsIntegrationTest class Drupal\Tests\quickedit\FunctionalJavascript core/modules/quickedit/tests/src/FunctionalJavascript/InlineFormErrorsIntegrationTest.php Tests Inline Form Errors compatibility with Quick Edit.
InlineFormErrorsServiceProvider class Drupal\inline_form_errors core/modules/inline_form_errors/src/InlineFormErrorsServiceProvider.php Overrides the form_error_handler service to enable inline form errors.
InlineTemplate class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/InlineTemplate.php Provides a render element where the user supplies an in-line Twig template.
InOperator class Drupal\views\Plugin\views\filter core/modules/views/src/Plugin/views/filter/InOperator.php Simple filter to handle matching of multiple options selectable via checkboxes. 8 8
InOperatorTest class Drupal\Tests\views\Unit\Plugin\filter core/modules/views/tests/src/Unit/Plugin/filter/InOperatorTest.php @coversDefaultClass \Drupal\views\Plugin\views\filter\InOperator[[api-linebreak]] @group views
InPlaceEditor class Drupal\quickedit\Annotation core/modules/quickedit/src/Annotation/InPlaceEditor.php Defines an InPlaceEditor annotation object.

Other projects


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