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
IconCollector class Drupal\Core\Theme\Icon core/lib/Drupal/Core/Theme/Icon/IconCollector.php A CacheCollector implementation for building icons info. 2
IconDefinition class Drupal\Core\Theme\Icon core/lib/Drupal/Core/Theme/Icon/IconDefinition.php Handle an icon definition. 11
IconDefinitionInterface interface Drupal\Core\Theme\Icon core/lib/Drupal/Core/Theme/Icon/IconDefinitionInterface.php Interface for icon definition. 1 7
IconDefinitionInvalidDataException class Drupal\Core\Theme\Icon\Exception core/lib/Drupal/Core/Theme/Icon/Exception/IconDefinitionInvalidDataException.php Raised when icon data is invalid. 2
IconDefinitionTest class Drupal\Tests\Core\Theme\Icon core/tests/Drupal/Tests/Core/Theme/Icon/IconDefinitionTest.php Tests Drupal\Core\Theme\Icon\IconDefinition.
IconExtractor class Drupal\Core\Theme\Icon\Attribute core/lib/Drupal/Core/Theme/Icon/Attribute/IconExtractor.php The icon_extractor attribute. 7
IconExtractorBase abstract class Drupal\Core\Theme\Icon core/lib/Drupal/Core/Theme/Icon/IconExtractorBase.php Base class for icon extractor plugins. 2 1
IconExtractorInterface interface Drupal\Core\Theme\Icon core/lib/Drupal/Core/Theme/Icon/IconExtractorInterface.php Interface for icon_extractor plugins. 2
IconExtractorPluginManager class Drupal\Core\Theme\Icon core/lib/Drupal/Core/Theme/Icon/IconExtractorPluginManager.php IconExtractor plugin manager. 2 2
IconExtractorSettingsForm class Drupal\Core\Theme\Icon core/lib/Drupal/Core/Theme/Icon/IconExtractorSettingsForm.php Handle icon extractor settings form conversion from YAML to Drupal Form API. 1
IconExtractorSettingsFormTest class Drupal\Tests\Core\Theme\Icon core/tests/Drupal/Tests/Core/Theme/Icon/IconExtractorSettingsFormTest.php Tests Drupal\Core\Theme\Icon\IconExtractorSettingsForm.
IconExtractorTest class Drupal\Tests\Core\Theme\Icon core/tests/Drupal/Tests/Core/Theme/Icon/IconExtractorTest.php Tests Drupal\Core\Theme\Icon\Attribute\IconExtractor.
IconExtractorWithFinder abstract class Drupal\Core\Theme\Icon core/lib/Drupal/Core/Theme/Icon/IconExtractorWithFinder.php Base class for icon_extractor plugins. 4 4
IconExtractorWithFinderInterface interface Drupal\Core\Theme\Icon core/lib/Drupal/Core/Theme/Icon/IconExtractorWithFinderInterface.php Interface for icon_extractor plugins. 1
IconFinder class Drupal\Core\Theme\Icon core/lib/Drupal/Core/Theme/Icon/IconFinder.php Icon finder to discover files under specific paths or URLs. 5
IconFinderInterface interface Drupal\Core\Theme\Icon core/lib/Drupal/Core/Theme/Icon/IconFinderInterface.php Interface for icon finder. 1
IconFinderTest class Drupal\Tests\Core\Theme\Icon core/tests/Drupal/Tests/Core/Theme/Icon/IconFinderTest.php Tests Drupal\Core\Theme\Icon\IconFinder.
IconMimeTypes final class Drupal\file core/modules/file/src/IconMimeTypes.php A utility class for working with MIME types. 1
IconPackConfigErrorException class Drupal\Core\Theme\Icon\Exception core/lib/Drupal/Core/Theme/Icon/Exception/IconPackConfigErrorException.php Raised when we have an icon pack error. 6
IconPackExtractorForm class Drupal\Core\Theme\Icon core/lib/Drupal/Core/Theme/Icon/IconPackExtractorForm.php The icon pack extractor form plugin. 6
IconPackExtractorFormTest class Drupal\Tests\Core\Theme\Icon core/tests/Drupal/Tests/Core/Theme/Icon/IconPackExtractorFormTest.php Tests Drupal\Core\Theme\Icon\IconPackExtractorForm.
IconPackManager class Drupal\Core\Theme\Icon\Plugin core/lib/Drupal/Core/Theme/Icon/Plugin/IconPackManager.php Defines an icon pack plugin manager to deal with icons. 2 2
IconPackManagerInterface interface Drupal\Core\Theme\Icon\Plugin core/lib/Drupal/Core/Theme/Icon/Plugin/IconPackManagerInterface.php Interface for icon pack manager. 1 2
IconPackManagerKernelTest class Drupal\KernelTests\Core\Theme\Icon core/tests/Drupal/KernelTests/Core/Theme/Icon/IconPackManagerKernelTest.php Tests values are from test module icon_test.
IconPackManagerTest class Drupal\Tests\Core\Theme\Icon core/tests/Drupal/Tests/Core/Theme/Icon/IconPackManagerTest.php Tests Drupal\Core\Theme\Icon\Plugin\IconPackManager.
IconsTwigExtension final class Drupal\Core\Template core/lib/Drupal/Core/Template/IconsTwigExtension.php Twig extension for icon. 1
IconsTwigExtensionTest class Drupal\Tests\Core\Theme\Icon core/tests/Drupal/Tests/Core/Theme/Icon/IconsTwigExtensionTest.php Tests Drupal\Core\Template\IconsTwigExtension.
IconTest class Drupal\Tests\Core\Theme\Icon core/tests/Drupal/Tests/Core/Theme/Icon/IconTest.php Tests Drupal\Core\Render\Element\Icon.
IconTestTrait trait Drupal\Tests\Core\Theme\Icon core/tests/Drupal/Tests/Core/Theme/Icon/IconTestTrait.php Provides methods to generate icons for tests. 3
IdAuditor class Drupal\migrate\Audit core/modules/migrate/src/Audit/IdAuditor.php Audits migrations that create content entities in the destination system. 3
IdConflictForm class Drupal\migrate_drupal_ui\Form core/modules/migrate_drupal_ui/src/Form/IdConflictForm.php Migrate Upgrade Id Conflict form. 1
IdConflictTest class Drupal\Tests\migrate_drupal_ui\Functional\d6 core/modules/migrate_drupal_ui/tests/src/Functional/d6/IdConflictTest.php Tests Drupal 6 Id Conflict page.
IdConflictTest class Drupal\Tests\migrate_drupal_ui\Functional\d7 core/modules/migrate_drupal_ui/tests/src/Functional/d7/IdConflictTest.php Tests Drupal 7 Id Conflict page.
IdMapTableNoDummyTest class Drupal\Tests\migrate_drupal\Kernel core/modules/migrate_drupal/tests/src/Kernel/IdMapTableNoDummyTest.php Test that no dummy migrate_map tables are created.
IFrameMarkup class Drupal\media core/modules/media/src/IFrameMarkup.php Defines an object that wraps oEmbed markup for use in an iFrame. 1
IFrameUrlHelper class Drupal\media core/modules/media/src/IFrameUrlHelper.php Providers helper functions for displaying oEmbed resources in an iFrame. 5 2
IFrameUrlHelperTest class Drupal\Tests\media\Unit core/modules/media/tests/src/Unit/IFrameUrlHelperTest.php Tests Drupal\media\IFrameUrlHelper.
Ignore class Drupal\Core\Config\Schema core/lib/Drupal/Core/Config/Schema/Ignore.php Configuration property to ignore. 2 1
IgnoreActiveTrailConstraint class Drupal\system\Plugin\Validation\Constraint core/modules/system/src/Plugin/Validation/Constraint/IgnoreActiveTrailConstraint.php Constraint on the ignore_active_trail configuration in system menu blocks.
IgnoreActiveTrailConstraintValidator class Drupal\system\Plugin\Validation\Constraint core/modules/system/src/Plugin/Validation/Constraint/IgnoreActiveTrailConstraintValidator.php Validator for the IgnoreActiveTrail constraint.
IgnoredWorkspaceHandler class Drupal\workspaces\Entity\Handler core/modules/workspaces/src/Entity/Handler/IgnoredWorkspaceHandler.php Defines a handler for entity types that are ignored by workspaces. 6
IHaveRuntimeContexts class Drupal\layout_builder_test\ContextProvider core/modules/layout_builder/tests/modules/layout_builder_test/src/ContextProvider/IHaveRuntimeContexts.php Defines a class for a fake context provider. 2
IHaveRuntimeContexts class Drupal\layout_builder_test\Plugin\Block core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/Block/IHaveRuntimeContexts.php Defines a class for a context-aware block.
Image class Drupal\ckeditor5\Plugin\CKEditor5Plugin core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Image.php CKEditor 5 Image plugin. 4 1
Image class Drupal\media\Plugin\media\Source core/modules/media/src/Plugin/media/Source/Image.php Image entity media source. 3
Image class Drupal\Component\Utility core/lib/Drupal/Component/Utility/Image.php Provides helpers to operate on images. 4
Image class Drupal\Core\Image core/lib/Drupal/Core/Image/Image.php Defines an image object to represent an image file. 1
ImageAccessTestHiddenHooks class Drupal\image_access_test_hidden\Hook core/modules/image/tests/modules/image_access_test_hidden/src/Hook/ImageAccessTestHiddenHooks.php Hook implementations for image_access_test_hidden.
ImageAdminStylesTest class Drupal\Tests\image\FunctionalJavascript core/modules/image/tests/src/FunctionalJavascript/ImageAdminStylesTest.php Tests creation, deletion, and editing of image styles and effects.
ImageAdminStylesTest class Drupal\Tests\image\Functional core/modules/image/tests/src/Functional/ImageAdminStylesTest.php Tests creation, deletion, and editing of image styles and effects.

Other projects


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