Classes, traits, and interfaces - 10.3.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 1518

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
InsertLobTest class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/InsertLobTest.php Tests the Insert query builder with LOB fields.
InsertTest class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/InsertTest.php Tests the insert builder.
InsertTrait trait Drupal\Core\Database\Query core/lib/Drupal/Core/Database/Query/InsertTrait.php Provides common functionality for INSERT and UPSERT queries.
InspectionTest class Drupal\KernelTests\Core\Plugin core/tests/Drupal/KernelTests/Core/Plugin/InspectionTest.php Tests that plugins implementing PluginInspectionInterface can be inspected.
Inspector class Drupal\Component\Assertion core/lib/Drupal/Component/Assertion/Inspector.php Generic inspections for the assert() statement. 36
InspectorTest class Drupal\Tests\Component\Assertion core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php @coversDefaultClass \Drupal\Component\Assertion\Inspector[[api-linebreak]] @group Assertion
InstallCommand class Drupal\Core\Command core/lib/Drupal/Core/Command/InstallCommand.php Installs a Drupal site for local testing/development.
InstallConfigurator final class Drupal\Core\Recipe core/lib/Drupal/Core/Recipe/InstallConfigurator.php @internal This API is experimental. 1
InstallConfiguratorTest class Drupal\KernelTests\Core\Recipe core/tests/Drupal/KernelTests/Core/Recipe/InstallConfiguratorTest.php @covers \Drupal\Core\Recipe\InstallConfigurator[[api-linebreak]] @group Recipe
InstallerAccessPolicy final class Drupal\Core\Installer core/lib/Drupal/Core/Installer/InstallerAccessPolicy.php Grants user 1 an all access pass during install.
InstallerBrokenDatabaseCredentialsTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabaseCredentialsTest.php Tests the installer with incorrect connection info in settings.php.
InstallerBrokenDatabasePortSettingsTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerBrokenDatabasePortSettingsTest.php Tests the installer with incorrect connection info in settings.php.
InstallerConfigDirectorySetNoDirectoryErrorTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryErrorTest.php Tests installation when a config_sync_directory is set up but does not exist.
InstallerConfigDirectorySetNoDirectoryTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerConfigDirectorySetNoDirectoryTest.php Tests the installer when a custom config directory set up but does not exist.
InstallerDatabaseErrorMessagesTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerDatabaseErrorMessagesTest.php Tests the installer with database errors.
InstallerDependenciesResolutionTest class Drupal\Tests\system\Kernel\Installer core/modules/system/tests/src/Kernel/Installer/InstallerDependenciesResolutionTest.php Tests that we handle module dependency resolution during install.
InstallerDeprecatedDriverNameTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerDeprecatedDriverNameTest.php Tests deprecation of the non-interactive installer with driver name.
InstallerEmptySettingsTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerEmptySettingsTest.php Tests the installer with empty settings file.
InstallerException class Drupal\Core\Installer\Exception core/lib/Drupal/Core/Installer/Exception/InstallerException.php Base class for exceptions thrown by installer. 2 1
InstallerExistingBrokenDatabaseSettingsTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerExistingBrokenDatabaseSettingsTest.php Tests the installer with broken database connection info in settings.php.
InstallerExistingConfigDirectoryTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigDirectoryTest.php Tests installation when a config_sync_directory exists and is set up.
InstallerExistingConfigExistingSettingsTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigExistingSettingsTest.php Verifies that installing from existing configuration works.
InstallerExistingConfigMultilingualTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigMultilingualTest.php Verifies that installing from existing configuration works.
InstallerExistingConfigNoConfigTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoConfigTest.php Verifies that profiles invalid config can not be installed.
InstallerExistingConfigNoProfileTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoProfileTest.php Verifies that installing from existing configuration without a profile works.
InstallerExistingConfigNoSystemSiteTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoSystemSiteTest.php Testing installing from config without system.site.
InstallerExistingConfigProfileHookInstall class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigProfileHookInstall.php Verifies that profiles with hook_install() can't be installed from config.
InstallerExistingConfigSyncDirectoryMultilingualTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryMultilingualTest.php Verifies that installing from existing configuration works.
InstallerExistingConfigSyncDirectoryProfileHookInstall class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileHookInstall.php Verifies that profiles with hook_install() can't be installed from config.
InstallerExistingConfigSyncDirectoryProfileMismatchTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigSyncDirectoryProfileMismatchTest.php Verifies that installing from existing configuration works.
InstallerExistingConfigTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigTest.php Verifies that installing from existing configuration works. 2
InstallerExistingConfigTestBase abstract class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigTestBase.php Provides a base class for testing installing from existing configuration. 8
InstallerExistingDatabaseSettingsTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerExistingDatabaseSettingsTest.php Tests installation with database information in an existing settings file.
InstallerExistingInstallationTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerExistingInstallationTest.php Tests the installer with an existing Drupal installation.
InstallerExistingSettingsNoProfileTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsNoProfileTest.php Tests the installer with an existing settings file but no install profile.
InstallerExistingSettingsTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerExistingSettingsTest.php Tests the installer with an existing settings file. 1 1
InstallerIsolationLevelExistingSettingsTest class Drupal\Tests\mysql\Functional core/modules/mysql/tests/src/Functional/InstallerIsolationLevelExistingSettingsTest.php Tests the isolation_level setting with existing database settings.
InstallerIsolationLevelNoDatabaseSettingsTest class Drupal\Tests\mysql\Functional core/modules/mysql/tests/src/Functional/InstallerIsolationLevelNoDatabaseSettingsTest.php Tests the isolation_level setting with no database settings.
InstallerKernel class Drupal\Core\Installer core/lib/Drupal/Core/Installer/InstallerKernel.php Extend DrupalKernel to handle force some kernel behaviors. 19
InstallerLanguageDirectionTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerLanguageDirectionTest.php Verifies that the early installer uses the correct language direction.
InstallerLanguagePageTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerLanguagePageTest.php Verifies that the installer language list combines local and remote languages.
InstallerLanguageTest class Drupal\KernelTests\Core\Installer core/tests/Drupal/KernelTests/Core/Installer/InstallerLanguageTest.php Tests for installer language support.
InstallerModuleExtensionList class Drupal\Core\Installer core/lib/Drupal/Core/Installer/InstallerModuleExtensionList.php Overrides the module extension list to have a static cache.
InstallerNonDefaultDatabaseDriverTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerNonDefaultDatabaseDriverTest.php Tests the interactive installer.
InstallerNonEnglishProfileWithoutLocaleModuleTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerNonEnglishProfileWithoutLocaleModuleTest.php Tests installing a profile with non-English language and no locale module.
InstallerObjectTest class Drupal\Tests\Core\Database core/tests/Drupal/Tests/Core/Database/InstallerObjectTest.php Tests the db_installer_object() function that is used during installation.
InstallerPerformanceTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerPerformanceTest.php Tests the interactive installer.
InstallerPostInstallTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerPostInstallTest.php Tests re-visiting the installer after a successful installation.
InstallerProfileRequirementsTest class Drupal\FunctionalTests\Installer core/tests/Drupal/FunctionalTests/Installer/InstallerProfileRequirementsTest.php Tests that an install profile can implement hook_requirements().
InstallerRedirectTrait trait Drupal\Core\Installer core/lib/Drupal/Core/Installer/InstallerRedirectTrait.php Provides methods for checking if Drupal is already installed. 3

Other projects


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