Classes, traits, and interfaces - 8.9.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 1511

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
IntegrationTest class Drupal\Tests\statistics\Functional\Views core/modules/statistics/tests/src/Functional/Views/IntegrationTest.php Tests basic integration of views data from the statistics module.
IntegrationTest class Drupal\Tests\aggregator\Kernel\Views core/modules/aggregator/tests/src/Kernel/Views/IntegrationTest.php Tests basic integration of views data from the aggregator module.
IntegrityConstraintViolationException class Drupal\Core\Database core/lib/Drupal/Core/Database/IntegrityConstraintViolationException.php Exception thrown if a query would violate an integrity constraint. 4
Internal class Drupal\ckeditor\Plugin\CKEditorPlugin core/modules/ckeditor/src/Plugin/CKEditorPlugin/Internal.php Defines the "internal" plugin (i.e. core plugins part of our CKEditor build).
InternalEntitiesTest class Drupal\Tests\jsonapi\Functional core/modules/jsonapi/tests/src/Functional/InternalEntitiesTest.php Makes assertions about the JSON:API behavior for internal entities.
InternalPropertyTestFieldItem class Drupal\entity_test\Plugin\Field\FieldType core/modules/system/tests/modules/entity_test/src/Plugin/Field/FieldType/InternalPropertyTestFieldItem.php Defines the 'Internal Property' entity test field type.
InternalTest class Drupal\Tests\ckeditor\Kernel\Plugin\CKEditorPlugin core/modules/ckeditor/tests/src/Kernel/Plugin/CKEditorPlugin/InternalTest.php @coversDefaultClass \Drupal\ckeditor\Plugin\CKEditorPlugin\Internal
InternalTypedDataTestTrait trait Drupal\Tests\serialization\Unit\Normalizer core/modules/serialization/tests/src/Unit/Normalizer/InternalTypedDataTestTrait.php Trait that provides mocked typed data objects.
InternalUri

in drupal:8.2.0 and is removed from drupal:9.0.0. Use \Drupal\menu_link_content\Plugin\migrate\process\LinkUri instead.

class Drupal\menu_link_content\Plugin\migrate\process\d7 core/modules/menu_link_content/src/Plugin/migrate/process/d7/InternalUri.php Processes an internal uri into an 'internal:' or 'entity:' URI.
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. 16
InvalidDecoratedMethod class Drupal\Component\Plugin\Exception core/lib/Drupal/Component/Plugin/Exception/InvalidDecoratedMethod.php Exception thrown when a decorator's _call() method is triggered, but the decorated object does not contain the requested method.
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 15
InvalidQueryException class Drupal\Core\Database core/lib/Drupal/Core/Database/InvalidQueryException.php Exception thrown if a query would be invalid. 2
InvalidUpdateHookTest class Drupal\Tests\system\Functional\UpdateSystem core/modules/system/tests/src/Functional/UpdateSystem/InvalidUpdateHookTest.php Tests that a module implementing hook_update_8000() causes an error to be displayed on update.
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. 5
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 @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\aggregator\Functional\Hal core/modules/aggregator/tests/src/Functional/Hal/ItemHalJsonAnonTest.php @group hal
ItemHalJsonBasicAuthTest class Drupal\Tests\aggregator\Functional\Hal core/modules/aggregator/tests/src/Functional/Hal/ItemHalJsonBasicAuthTest.php @group hal
ItemHalJsonCookieTest class Drupal\Tests\aggregator\Functional\Hal core/modules/aggregator/tests/src/Functional/Hal/ItemHalJsonCookieTest.php @group hal
ItemHalJsonTestBase abstract class Drupal\Tests\aggregator\Functional\Hal core/modules/aggregator/tests/src/Functional/Hal/ItemHalJsonTestBase.php ResourceTestBase for Item entity. 4 1
ItemHalJsonTestBase

in drupal:8.6.0 and is removed from drupal:9.0.0. Use Drupal\Tests\aggregator\Functional\Hal\ItemHalJsonTestBase instead.

abstract class Drupal\Tests\hal\Functional\EntityResource\Item core/modules/hal/tests/src/Functional/EntityResource/Item/ItemHalJsonTestBase.php
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
ItemJsonBasicAuthTest class Drupal\Tests\aggregator\Functional\Rest core/modules/aggregator/tests/src/Functional/Rest/ItemJsonBasicAuthTest.php @group rest
ItemJsonCookieTest class Drupal\Tests\aggregator\Functional\Rest core/modules/aggregator/tests/src/Functional/Rest/ItemJsonCookieTest.php @group rest
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. 8 2

Other projects


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