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
InlineBlockEntityOperations class Drupal\layout_builder core/modules/layout_builder/src/InlineBlockEntityOperations.php Defines a class for reacting to entity events related to Inline Blocks. 2
InlineBlockEntityOperationsTest class Drupal\Tests\layout_builder\Unit core/modules/layout_builder/tests/src/Unit/InlineBlockEntityOperationsTest.php Tests Drupal\layout_builder\InlineBlockEntityOperations.
InlineBlockPrivateFilesTest class Drupal\Tests\layout_builder\FunctionalJavascript core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php Test access to private files in block fields on the Layout Builder.
InlineBlockTest class Drupal\Tests\layout_builder\FunctionalJavascript core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php Tests that the inline block feature works correctly.
InlineBlockTestBase abstract class Drupal\Tests\layout_builder\FunctionalJavascript core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php Base class for testing inline blocks. 3 1
InlineBlockUsage class Drupal\layout_builder core/modules/layout_builder/src/InlineBlockUsage.php Service class to track inline block usage. 2 2
InlineBlockUsageInterface interface Drupal\layout_builder core/modules/layout_builder/src/InlineBlockUsageInterface.php Defines an interface for tracking inline block usage. 1 3
InlineBlockUsageTest class Drupal\Tests\layout_builder\Unit core/modules/layout_builder/tests/src/Unit/InlineBlockUsageTest.php Tests Drupal\layout_builder\InlineBlockUsage.
InlineBlockUsageTest class Drupal\Tests\layout_builder\Kernel core/modules/layout_builder/tests/src/Kernel/InlineBlockUsageTest.php Class for testing the InlineBlockUsage service.
InlineFormErrorsHooks class Drupal\inline_form_errors\Hook core/modules/inline_form_errors/src/Hook/InlineFormErrorsHooks.php Hook implementations for inline_form_errors.
InlineFormErrorsServiceProvider class Drupal\inline_form_errors core/modules/inline_form_errors/src/InlineFormErrorsServiceProvider.php Overrides the form_error_handler service to enable inline form errors.
InlineFormErrorsThemeHooks class Drupal\inline_form_errors\Hook core/modules/inline_form_errors/src/Hook/InlineFormErrorsThemeHooks.php Hook implementations for inline_form_errors.
InlineTemplate class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/InlineTemplate.php Provides a render element where the user supplies an in-line Twig template.
InOperator class Drupal\views\Plugin\views\filter core/modules/views/src/Plugin/views/filter/InOperator.php Filter to handle matching of multiple options selectable via checkboxes. 8 7
InOperatorTest class Drupal\Tests\views\Unit\Plugin\filter core/modules/views/tests/src/Unit/Plugin/filter/InOperatorTest.php Tests Drupal\views\Plugin\views\filter\InOperator.
InputCollectorInterface interface Drupal\Core\Recipe core/lib/Drupal/Core/Recipe/InputCollectorInterface.php Collects user-provided input values for recipes. 1 1
InputConfigurator final class Drupal\Core\Recipe core/lib/Drupal/Core/Recipe/InputConfigurator.php Collects and validates input values for a recipe. 1
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.
InputStreamFileWriter class Drupal\file\Upload core/modules/file/src/Upload/InputStreamFileWriter.php Writes files from a input stream to a temporary file. 1 2
InputStreamFileWriterInterface interface Drupal\file\Upload core/modules/file/src/Upload/InputStreamFileWriterInterface.php Uploads files from a stream. 1 2
InputStreamUploadedFile final class Drupal\file\Upload core/modules/file/src/Upload/InputStreamUploadedFile.php An uploaded file from an input stream. 2
InputTest class Drupal\KernelTests\Core\Recipe core/tests/Drupal/KernelTests/Core/Recipe/InputTest.php Tests 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.
Insert class Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses/Insert.php CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Insert.
Insert class Drupal\sqlite\Driver\Database\sqlite core/modules/sqlite/src/Driver/Database/sqlite/Insert.php SQLite implementation of \Drupal\Core\Database\Query\Insert.
Insert class Drupal\mysql\Driver\Database\mysql core/modules/mysql/src/Driver/Database/mysql/Insert.php MySQL implementation of \Drupal\Core\Database\Query\Insert.
Insert class Drupal\Core\Database\Query core/lib/Drupal/Core/Database/Query/Insert.php General class for an abstracted INSERT query. 4 6
InsertCommand class Drupal\Core\Ajax core/lib/Drupal/Core/Ajax/InsertCommand.php Generic AJAX command for inserting content. 6 7
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. 38
InspectorTest class Drupal\Tests\Component\Assertion core/tests/Drupal/Tests/Component/Assertion/InspectorTest.php Tests Drupal\Component\Assertion\Inspector.
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 Tests Install Configurator.
InstalledPackage final class Drupal\package_manager core/modules/package_manager/src/InstalledPackage.php A value object that represents an installed Composer package. 5
InstalledPackagesList final class Drupal\package_manager core/modules/package_manager/src/InstalledPackagesList.php Defines a class to list installed Composer packages. 6
InstalledPackagesListTest class Drupal\Tests\package_manager\Unit core/modules/package_manager/tests/src/Unit/InstalledPackagesListTest.php Tests Drupal\package_manager\InstalledPackagesList.
InstalledPackagesListTest class Drupal\Tests\package_manager\Kernel core/modules/package_manager/tests/src/Kernel/InstalledPackagesListTest.php Tests Drupal\package_manager\InstalledPackagesList.
InstalledPackagesListTrait trait Drupal\Tests\package_manager\Traits core/modules/package_manager/tests/src/Traits/InstalledPackagesListTrait.php A trait for comparing InstalledPackagesList objects. 2
InstalledPackageTest class Drupal\Tests\package_manager\Unit core/modules/package_manager/tests/src/Unit/InstalledPackageTest.php Tests Drupal\package_manager\InstalledPackage.
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.

Other projects


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