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
InternalTest class Drupal\Tests\ckeditor\Kernel\Plugin\CKEditorPlugin core/modules/ckeditor/tests/src/Kernel/Plugin/CKEditorPlugin/InternalTest.php @coversDefaultClass \Drupal\ckeditor\Plugin\CKEditorPlugin\Internal[[api-linebreak]]
InternalTypedDataTestTrait trait Drupal\Tests\serialization\Unit\Normalizer core/modules/serialization/tests/src/Unit/Normalizer/InternalTypedDataTestTrait.php Trait that provides mocked typed data objects.
InternalViolation final class Drupal\Core\Field core/lib/Drupal/Core/Field/InternalViolation.php Wraps a violation to allow arrayPropertyPath to be deprecated. 1
InternalViolationTest class Drupal\Tests\Core\Field core/tests/Drupal/Tests/Core/Field/InternalViolationTest.php @coversDefaultClass \Drupal\Core\Field\InternalViolation[[api-linebreak]] @group legacy
Interpolator class Drupal\Composer\Plugin\Scaffold composer/Plugin/Scaffold/Interpolator.php Injects config values from an associative array into a string. 2
InvalidConsumer class Drupal\Tests\Core\DependencyInjection\Compiler core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php
InvalidDataTest class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/InvalidDataTest.php Tests handling of some invalid data.
InvalidDataTypeException class Drupal\Component\Serialization\Exception core/lib/Drupal/Component/Serialization/Exception/InvalidDataTypeException.php Exception thrown when a data type is invalid. 1 18
InvalidDecoratedMethod class Drupal\Component\Plugin\Exception core/lib/Drupal/Component/Plugin/Exception/InvalidDecoratedMethod.php Thrown when a decorator's _call() method uses a method that does not exist.
InvalidDeriverException class Drupal\Component\Plugin\Exception core/lib/Drupal/Component/Plugin/Exception/InvalidDeriverException.php Exception to be thrown if a plugin tries to use an invalid deriver. 2
InvalidHandler class Drupal\Tests\Core\DependencyInjection\Compiler core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php
InvalidLibrariesExtendSpecificationException class Drupal\Core\Asset\Exception core/lib/Drupal/Core/Asset/Exception/InvalidLibrariesExtendSpecificationException.php Defines a custom exception for an invalid libraries-extend specification. 2
InvalidLibrariesOverrideSpecificationException class Drupal\Core\Asset\Exception core/lib/Drupal/Core/Asset/Exception/InvalidLibrariesOverrideSpecificationException.php Defines a custom exception if a definition refers to a non-existent library. 3
InvalidLibraryFileException class Drupal\Core\Asset\Exception core/lib/Drupal/Core/Asset/Exception/InvalidLibraryFileException.php Defines an exception if the library file could not be parsed. 2
InvalidLinkTemplateException class Drupal\Core\Entity\Exception core/lib/Drupal/Core/Entity/Exception/InvalidLinkTemplateException.php Indicates that a link template does not follow the required pattern. 2
InvalidLookupKeyException class Drupal\Core\Config\Entity\Query core/lib/Drupal/Core/Config/Entity/Query/InvalidLookupKeyException.php Exception thrown when a config entity uses an invalid lookup key.
InvalidMergeQueryException class Drupal\Core\Database\Query core/lib/Drupal/Core/Database/Query/InvalidMergeQueryException.php Exception thrown for merge queries that do not make semantic sense. 1
InvalidPluginDefinitionException class Drupal\Component\Plugin\Exception core/lib/Drupal/Component/Plugin/Exception/InvalidPluginDefinitionException.php Defines a class for invalid plugin definition exceptions. 1 18
InvalidQueryException class Drupal\Core\Database core/lib/Drupal/Core/Database/InvalidQueryException.php Exception thrown if a query would be invalid. 2
InvalidStreamWrapperException class Drupal\Core\File\Exception core/lib/Drupal/Core/File/Exception/InvalidStreamWrapperException.php Exception thrown when a file's stream wrapper is invalid. 10
InvalidUpdateHookTest class Drupal\Tests\system\Functional\UpdateSystem core/modules/system/tests/src/Functional/UpdateSystem/InvalidUpdateHookTest.php Tests that hook_update_8000() is disallowed.
InvalidVersionIdentifierException class Drupal\jsonapi\Revisions core/modules/jsonapi/src/Revisions/InvalidVersionIdentifierException.php Used when a version ID is invalid.
InvokableUntrustedObject class Drupal\Tests\Core\Security core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php
InvokeCommand class Drupal\Core\Ajax core/lib/Drupal/Core/Ajax/InvokeCommand.php AJAX command for invoking an arbitrary jQuery method. 6
IpAddressBlockingTest class Drupal\Tests\ban\Functional core/modules/ban/tests/src/Functional/IpAddressBlockingTest.php Tests IP address banning.
IpCacheContext class Drupal\Core\Cache\Context core/lib/Drupal/Core/Cache/Context/IpCacheContext.php Defines the IpCacheContext service, for "per IP address" caching. 2
IsFrontPathCacheContext class Drupal\Core\Cache\Context core/lib/Drupal/Core/Cache/Context/IsFrontPathCacheContext.php Defines a cache context for whether the URL is the front page of the site. 1 2
IsFrontPathCacheContextTest class Drupal\Tests\Core\Cache\Context core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php @coversDefaultClass \Drupal\Core\Cache\Context\IsFrontPathCacheContext[[api-linebreak]] @group Cache
IsNullConstraint class Drupal\Core\Validation\Plugin\Validation\Constraint core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/IsNullConstraint.php Null constraint.
IsNullConstraintValidator class Drupal\Core\Validation\Plugin\Validation\Constraint core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/IsNullConstraintValidator.php Null constraint validator.
IsSuperUserCacheContext class Drupal\Core\Cache\Context core/lib/Drupal/Core/Cache/Context/IsSuperUserCacheContext.php Defines the IsSuperUserCacheContext service, for "super user or not" caching. 2
Item class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/Item.php Provides a display-only form element with an optional title and description.
Item class Drupal\aggregator\Entity core/modules/aggregator/src/Entity/Item.php Defines the aggregator item entity class. 12
ItemCacheTagsTest class Drupal\Tests\aggregator\Functional core/modules/aggregator/tests/src/Functional/ItemCacheTagsTest.php Tests the Item entity's cache tags.
ItemHalJsonAnonTest class Drupal\Tests\hal\Functional\aggregator core/modules/hal/tests/src/Functional/aggregator/ItemHalJsonAnonTest.php @group hal @group legacy
ItemHalJsonBasicAuthTest class Drupal\Tests\hal\Functional\aggregator core/modules/hal/tests/src/Functional/aggregator/ItemHalJsonBasicAuthTest.php @group hal @group legacy
ItemHalJsonCookieTest class Drupal\Tests\hal\Functional\aggregator core/modules/hal/tests/src/Functional/aggregator/ItemHalJsonCookieTest.php @group hal @group legacy
ItemHalJsonTestBase abstract class Drupal\Tests\hal\Functional\aggregator core/modules/hal/tests/src/Functional/aggregator/ItemHalJsonTestBase.php ResourceTestBase for Item entity. 3
ItemInterface interface Drupal\aggregator core/modules/aggregator/src/ItemInterface.php Provides an interface defining an aggregator item entity. 1 1
ItemJsonAnonTest class Drupal\Tests\aggregator\Functional\Rest core/modules/aggregator/tests/src/Functional/Rest/ItemJsonAnonTest.php @group rest @group legacy
ItemJsonBasicAuthTest class Drupal\Tests\aggregator\Functional\Rest core/modules/aggregator/tests/src/Functional/Rest/ItemJsonBasicAuthTest.php @group rest @group legacy
ItemJsonCookieTest class Drupal\Tests\aggregator\Functional\Rest core/modules/aggregator/tests/src/Functional/Rest/ItemJsonCookieTest.php @group rest @group legacy
ItemLayoutFieldBlockTest class Drupal\Tests\layout_builder\FunctionalJavascript core/modules/layout_builder/tests/src/FunctionalJavascript/ItemLayoutFieldBlockTest.php Field blocks tests for the override layout.
ItemList class Drupal\Core\TypedData\Plugin\DataType core/lib/Drupal/Core/TypedData/Plugin/DataType/ItemList.php A generic list class. 1 2
ItemResourceTestBase abstract class Drupal\Tests\aggregator\Functional\Rest core/modules/aggregator/tests/src/Functional/Rest/ItemResourceTestBase.php ResourceTestBase for Item entity. @group legacy 7 1
ItemsImporter class Drupal\aggregator core/modules/aggregator/src/ItemsImporter.php Defines an importer of aggregator items. 2
ItemsImporterInterface interface Drupal\aggregator core/modules/aggregator/src/ItemsImporterInterface.php Provides an interface defining an aggregator items importer. 1
ItemsPerPageTest class Drupal\Tests\views\Functional\Wizard core/modules/views/tests/src/Functional/Wizard/ItemsPerPageTest.php Tests that the views wizard can specify the number of items per page.
ItemStorage class Drupal\aggregator core/modules/aggregator/src/ItemStorage.php Defines the storage handler class for feed item entities.
ItemStorageInterface interface Drupal\aggregator core/modules/aggregator/src/ItemStorageInterface.php Defines an interface for aggregator item entity storage classes. 1 2

Other projects


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