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
InstallerTranslationMultipleLanguageKeepEnglishTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageKeepEnglishTest.php Tests that keeping English in a foreign language install works.
InstallerTranslationMultipleLanguageNonInteractiveTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageNonInteractiveTest.php Tests translation files for multiple languages get imported during install. 1
InstallerTranslationMultipleLanguageTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationMultipleLanguageTest.php Tests translation files for multiple languages get imported during install. 1
InstallerTranslationNonStandardFilenamesTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationNonStandardFilenamesTest.php Tests non-standard named translation files get imported during install.
InstallerTranslationQueryTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationQueryTest.php Installs Drupal in German and checks resulting site.
InstallerTranslationTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerTranslationTest.php Installs Drupal in German and checks resulting site.
InstallHelper class Drupal\demo_umami_content core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php Defines a helper class for importing default content. 2
InstallProfileDependenciesTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallProfileDependenciesTest.php Tests that an install profile can require modules.
InstallProfileUninstallTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallProfileUninstallTest.php Tests that an install profile can be uninstalled.
InstallProfileUninstallValidator class Drupal\Core\Extension core/lib/Drupal/Core/Extension/InstallProfileUninstallValidator.php Ensures install profile can only be uninstalled if the modules are available. 2
InstallRequirementsInterface interface Drupal\Core\Extension core/lib/Drupal/Core/Extension/InstallRequirementsInterface.php Provides method for checking requirements during install time. 11 12
InstallRequirementsTest class Drupal\KernelTests\Core\Installer core/tests/Drupal/KernelTests/Core/Installer/InstallRequirementsTest.php Tests for install requirements.
InstallStorage class Drupal\Core\Config core/lib/Drupal/Core/Config/InstallStorage.php Storage used by the Drupal installer. 2 18
InstallTasksTest class Drupal\Tests\mysql\Unit core/modules/mysql/tests/src/Unit/InstallTasksTest.php Tests the MySQL install tasks.
InstallTest class Drupal\BuildTests\TestSiteApplication core/tests/Drupal/BuildTests/TestSiteApplication/InstallTest.php Tests.
InstallTest class Drupal\Tests\system\Kernel\Module core/modules/system/tests/src/Kernel/Module/InstallTest.php Tests the installation of modules.
InstallTranslationFilePatternTest class Drupal\Tests\system\Kernel\Installer core/modules/system/tests/src/Kernel/Installer/InstallTranslationFilePatternTest.php Tests for installer language support.
IntefaceWithConstants interface Drupal\Tests\Component\Annotation\Doctrine\Fixtures core/tests/Drupal/Tests/Component/Annotation/Doctrine/Fixtures/IntefaceWithConstants.php 1
IntegerData class Drupal\Core\TypedData\Plugin\DataType core/lib/Drupal/Core/TypedData/Plugin/DataType/IntegerData.php The integer data type. 2 6 1
IntegerFormatter class Drupal\Core\Field\Plugin\Field\FieldFormatter core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/IntegerFormatter.php Plugin implementation of the 'number_integer' formatter.
IntegerInterface interface Drupal\Core\TypedData\Type core/lib/Drupal/Core/TypedData/Type/IntegerInterface.php Interface for integer numbers. 1 8
IntegerItem class Drupal\Core\Field\Plugin\Field\FieldType core/lib/Drupal/Core/Field/Plugin/Field/FieldType/IntegerItem.php Defines the 'integer' field type. 1 2
IntegrityConstraintViolationException class Drupal\Core\Database core/lib/Drupal/Core/Database/IntegrityConstraintViolationException.php Exception thrown if a query would violate an integrity constraint. 8
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.
InternalTypedDataTestTrait trait Drupal\Tests\serialization\Unit\Normalizer core/modules/serialization/tests/src/Unit/Normalizer/InternalTypedDataTestTrait.php Trait that provides mocked typed data objects.
Interpolator class Drupal\Composer\Plugin\Scaffold composer/Plugin/Scaffold/Interpolator.php Injects config values from an associative array into a string. 3
InvalidatingCacheBackendInterface interface Drupal\Tests\Core\Cache core/tests/Drupal/Tests/Core/Cache/CacheTagsInvalidatorTest.php Test interface for testing the cache tags validator.
InvalidCharsetException class Drupal\mysqli\Driver\Database\mysqli core/modules/mysqli/src/Driver/Database/mysqli/InvalidCharsetException.php This exception class signals an invalid charset is being used.
InvalidComponentDataException class Drupal\Core\Render\Component\Exception core/lib/Drupal/Core/Render/Component/Exception/InvalidComponentDataException.php Raised when a component is rendering with invalid data. 2
InvalidComponentException class Drupal\Core\Render\Component\Exception core/lib/Drupal/Core/Render/Component/Exception/InvalidComponentException.php Custom exception for invalid components. 8
InvalidConfigException final class Drupal\Core\Recipe core/lib/Drupal/Core/Recipe/InvalidConfigException.php Thrown if config created or changed by a recipe fails validation. 5
InvalidConsumer class Drupal\Tests\Core\DependencyInjection\Compiler core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php Test class of an invalid consumer.
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
InvalidEntityException final class Drupal\Core\DefaultContent core/lib/Drupal/Core/DefaultContent/InvalidEntityException.php Thrown if an entity being imported has validation errors. 1
InvalidHandler class Drupal\Tests\Core\DependencyInjection\Compiler core/tests/Drupal/Tests/Core/DependencyInjection/Compiler/TaggedHandlersPassTest.php Invalid test handler class.
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 28
InvalidQueryException class Drupal\Core\Database core/lib/Drupal/Core/Database/InvalidQueryException.php Exception thrown if a query would be invalid. 4
InvalidStreamWrapperException class Drupal\Core\File\Exception core/lib/Drupal/Core/File/Exception/InvalidStreamWrapperException.php Exception thrown when a file's stream wrapper is invalid. 9
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.

Other projects


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