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
ImageTest class Drupal\KernelTests\Core\Theme core/tests/Drupal/KernelTests/Core/Theme/ImageTest.php Tests built-in image theme functions.
ImageTestBase abstract class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBase.php Tests Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image. 2
ImageTestBaselineTrait trait Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestBaselineTrait.php Trait with common test methods for image tests.
ImageTestProviderTest class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestProviderTest.php Tests Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image.
ImageTestProviderTrait trait Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestProviderTrait.php Provides test methods using data providers for image tests.
ImageTestTestBase abstract class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageTestTestBase.php Provides a base class for testing CKEditor 5 image embedding and uploads. 2
ImageThemeFunctionTest class Drupal\Tests\image\Kernel core/modules/image/tests/src/Kernel/ImageThemeFunctionTest.php Tests image theme functions.
ImageThemeHooks class Drupal\image\Hook core/modules/image/src/Hook/ImageThemeHooks.php Theme hook implementations for image module.
ImageToolkit class Drupal\Core\ImageToolkit\Attribute core/lib/Drupal/Core/ImageToolkit/Attribute/ImageToolkit.php Defines a Plugin attribute for the image toolkit plugin. 5
ImageToolkit class Drupal\Core\ImageToolkit\Annotation core/lib/Drupal/Core/ImageToolkit/Annotation/ImageToolkit.php Defines a Plugin annotation object for the image toolkit plugin.
ImageToolkitBase abstract class Drupal\Core\ImageToolkit core/lib/Drupal/Core/ImageToolkit/ImageToolkitBase.php Provides a base class for image toolkit plugins. 2 2
ImageToolkitForm class Drupal\system\Form core/modules/system/src/Form/ImageToolkitForm.php Configures image toolkit settings for this site. 1
ImageToolkitInterface interface Drupal\Core\ImageToolkit core/lib/Drupal/Core/ImageToolkit/ImageToolkitInterface.php Defines an interface for image toolkits. 1 2 1
ImageToolkitManager class Drupal\Core\ImageToolkit core/lib/Drupal/Core/ImageToolkit/ImageToolkitManager.php Manages image toolkit plugins. 4 2
ImageToolkitOperation class Drupal\Core\ImageToolkit\Attribute core/lib/Drupal/Core/ImageToolkit/Attribute/ImageToolkitOperation.php Defines a Plugin attribute for the image toolkit plugin. 14
ImageToolkitOperation class Drupal\Core\ImageToolkit\Annotation core/lib/Drupal/Core/ImageToolkit/Annotation/ImageToolkitOperation.php Defines a Plugin annotation object for the image toolkit operation plugin.
ImageToolkitOperationBase abstract class Drupal\Core\ImageToolkit core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationBase.php Provides a base class for image toolkit operation plugins. 2 2
ImageToolkitOperationInterface interface Drupal\Core\ImageToolkit core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationInterface.php Defines an interface for image toolkit operations. 1
ImageToolkitOperationManager class Drupal\Core\ImageToolkit core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationManager.php Manages toolkit operation plugins. 2
ImageToolkitOperationManagerInterface interface Drupal\Core\ImageToolkit core/lib/Drupal/Core/ImageToolkit/ImageToolkitOperationManagerInterface.php Defines an interface for image toolkit operation managers. 1 3
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.
ImageUrlProviderTest class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageUrlProviderTest.php Tests Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image.
ImageUrlTest class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageUrlTest.php Tests Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image.
ImageUrlTestBase abstract class Drupal\Tests\ckeditor5\FunctionalJavascript core/modules/ckeditor5/tests/src/FunctionalJavascript/ImageUrlTestBase.php Provides a base class for testing CKEditor 5 image URL insertion. 2
ImageViewsDataTest class Drupal\Tests\image\Kernel\Views core/modules/image/tests/src/Kernel/Views/ImageViewsDataTest.php Tests image views data.
ImageViewsHooks class Drupal\image\Hook core/modules/image/src/Hook/ImageViewsHooks.php Hook implementations for image.
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. 12
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 Tests Drupal\Core\Config\ImmutableConfig.
ImmutablePathList final class Drupal\package_manager core/modules/package_manager/src/ImmutablePathList.php Defines a path list that cannot be changed. 3
ImmutablePropertiesConstraint class Drupal\Core\Entity\Plugin\Validation\Constraint core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ImmutablePropertiesConstraint.php Checks if config entity properties have been changed. 1
ImmutablePropertiesConstraintValidator class Drupal\Core\Entity\Plugin\Validation\Constraint core/lib/Drupal/Core/Entity/Plugin/Validation/Constraint/ImmutablePropertiesConstraintValidator.php Validates the ImmutableProperties constraint. 1
ImmutablePropertiesConstraintValidatorTest class Drupal\KernelTests\Core\Entity core/tests/Drupal/KernelTests/Core/Entity/ImmutablePropertiesConstraintValidatorTest.php Tests Immutable Properties Constraint Validator.
ImplementationList class Drupal\Core\Hook core/lib/Drupal/Core/Hook/ImplementationList.php Contains the ordered list of implementations for a hook. 3
ImplementationListTest class Drupal\Tests\Core\Hook core/tests/Drupal/Tests/Core/Hook/ImplementationListTest.php Tests ImplementationList.
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
Importer final class Drupal\Core\DefaultContent core/lib/Drupal/Core/DefaultContent/Importer.php A service for handling import of content. 5
ImporterTest class Drupal\KernelTests\Core\DefaultContent core/tests/Drupal/KernelTests/Core/DefaultContent/ImporterTest.php Tests the Default Content Importer.
ImportException final class Drupal\Core\DefaultContent core/lib/Drupal/Core/DefaultContent/ImportException.php Exception thrown when there is an error importing content. 2
ImportForm class Drupal\locale\Form core/modules/locale/src/Form/ImportForm.php Form constructor for the translation import screen. 1
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. 1
InboundPathProcessorInterface interface Drupal\Core\PathProcessor core/lib/Drupal/Core/PathProcessor/InboundPathProcessorInterface.php Defines an interface for classes that process the inbound path. 11 13
IncludedData class Drupal\jsonapi\JsonApiResource core/modules/jsonapi/src/JsonApiResource/IncludedData.php Represents the included member of a JSON:API document. 1 3
IncludeResolver class Drupal\jsonapi core/modules/jsonapi/src/IncludeResolver.php Resolves included resources for an entity or collection of entities. 1 2

Other projects


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