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
InPlaceEditorBase abstract class Drupal\quickedit\Plugin core/modules/quickedit/src/Plugin/InPlaceEditorBase.php Defines a base in-place editor implementation. 5 5
InPlaceEditorInterface interface Drupal\quickedit\Plugin core/modules/quickedit/src/Plugin/InPlaceEditorInterface.php Defines an interface for in-place editors plugins. 3 2
InPlaceEditorManager class Drupal\quickedit\Plugin core/modules/quickedit/src/Plugin/InPlaceEditorManager.php Provides an in-place editor manager. 2
InputBag final class Drupal\Core\Http core/lib/Drupal/Core/Http/InputBag.php Forward compatibility class for Symfony 5. 3
InputBagTest class Drupal\Tests\Core\Http core/tests/Drupal/Tests/Core/Http/InputBagTest.php @coversDefaultClass \Drupal\Core\Http\InputBag[[api-linebreak]]
InputRequired class Drupal\views\Plugin\views\exposed_form core/modules/views/src/Plugin/views/exposed_form/InputRequired.php Exposed form plugin that provides an exposed form with required input.
Insecure class Drupal\editor_test\EditorXssFilter core/modules/editor/tests/modules/editor_test/src/EditorXssFilter/Insecure.php Defines an insecure text editor XSS filter (for testing purposes).
Insert class Drupal\pgsql\Driver\Database\pgsql core/modules/pgsql/src/Driver/Database/pgsql/Insert.php PostgreSQL implementation of \Drupal\Core\Database\Query\Insert. 2 2
Insert class Drupal\driver_test\Driver\Database\DrivertestMysql core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Insert.php MySQL test implementation of \Drupal\Core\Database\Query\Insert.
Insert class Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Insert.php MySQL test implementation of \Drupal\Core\Database\Query\Insert.
Insert class Drupal\driver_test\Driver\Database\DrivertestPgsql core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Insert.php PostgreSQL implementation of \Drupal\Core\Database\Query\Insert.
Insert class Drupal\corefake\Driver\Database\corefakeWithAllCustomClasses core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefakeWithAllCustomClasses/Insert.php CorefakeWithAllCustomClasses implementation of \Drupal\Core\Database\Insert.
Insert

in drupal:9.4.0 and is removed from drupal:11.0.0. The SQLite database driver has been moved to the sqlite module.

class Drupal\Core\Database\Driver\sqlite core/lib/Drupal/Core/Database/Driver/sqlite/Insert.php SQLite implementation of \Drupal\Core\Database\Query\Insert. 1
Insert

in drupal:9.4.0 and is removed from drupal:11.0.0. The MySQL database driver has been moved to the mysql module.

class Drupal\Core\Database\Driver\mysql core/lib/Drupal/Core/Database/Driver/mysql/Insert.php MySQL implementation of \Drupal\Core\Database\Query\Insert. 1
Insert

in drupal:9.4.0 and is removed from drupal:11.0.0. The PostgreSQL database driver has been moved to the pgsql module.

class Drupal\Core\Database\Driver\pgsql core/lib/Drupal/Core/Database/Driver/pgsql/Insert.php PostgreSQL implementation of \Drupal\Core\Database\Query\Insert. 1
Insert class Drupal\Core\Database\Query core/lib/Drupal/Core/Database/Query/Insert.php General class for an abstracted INSERT query. 4 5
Insert class Drupal\mysql\Driver\Database\mysql core/modules/mysql/src/Driver/Database/mysql/Insert.php MySQL implementation of \Drupal\Core\Database\Query\Insert. 3 3
Insert class Drupal\sqlite\Driver\Database\sqlite core/modules/sqlite/src/Driver/Database/sqlite/Insert.php SQLite implementation of \Drupal\Core\Database\Query\Insert. 1 1
InsertCommand class Drupal\Core\Ajax core/lib/Drupal/Core/Ajax/InsertCommand.php Generic AJAX command for inserting content. 6 5
InsertDefaultsTest class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/InsertDefaultsTest.php Tests the Insert query builder with default values.
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. 33
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.
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.
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.
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. 1
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.
InstallerKernel class Drupal\Core\Installer core/lib/Drupal/Core/Installer/InstallerKernel.php Extend DrupalKernel to handle force some kernel behaviors. 15

Other projects


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