You are here

Classes, traits, and interfaces in Drupal 9

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

Namesort descending Type Namespace Location Description Direct uses Use statements Strings
UpdateManager class Drupal\update core/modules/update/src/UpdateManager.php Default implementation of UpdateManagerInterface. 2
UpdateManagerAccessCheck class Drupal\update\Access core/modules/update/src/Access/UpdateManagerAccessCheck.php Determines whether allow authorized operations is set. 2
UpdateManagerInstall class Drupal\update\Form core/modules/update/src/Form/UpdateManagerInstall.php Configure update settings for this site. 1
UpdateManagerInterface interface Drupal\update core/modules/update/src/UpdateManagerInterface.php Manages project update information. 1 8
UpdateManagerUpdate class Drupal\update\Form core/modules/update/src/Form/UpdateManagerUpdate.php Configure update settings for this site. 1
UpdateManagerUpdateTest class Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateManagerUpdateTest.php Tests the Update Manager module's 'Update' form and functionality.
UpdatePathLastRemovedTest class Drupal\Tests\system\Functional\UpdateSystem core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathLastRemovedTest.php Tests that modules can define their last removed update function.
UpdatePathNewDependencyTest class Drupal\Tests\system\Functional\UpdateSystem core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathNewDependencyTest.php Modules can introduce new dependencies and enable them in update hooks.
UpdatePathTestBase abstract class Drupal\FunctionalTests\Update core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php Provides a base class for writing an update test. 24 23
UpdatePathTestBaseFilledTest class Drupal\Tests\system\Functional\UpdateSystem core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php Runs UpdatePathTestBaseTest with a dump filled with content.
UpdatePathTestBaseTest class Drupal\FunctionalTests\Update core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBaseTest.php Tests the update path base class. 1 1
UpdatePathTestJavaScriptTest class Drupal\Tests\system\Functional\UpdateSystem core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestJavaScriptTest.php Tests the presence of JavaScript at update.php.
UpdatePathTestTrait trait Drupal\Tests core/tests/Drupal/Tests/UpdatePathTestTrait.php Trait UpdatePathTestTrait. 12
UpdatePathWithBrokenRoutingTest class Drupal\Tests\system\Functional\UpdateSystem core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathWithBrokenRoutingTest.php Tests the update path with a broken router.
UpdatePostUpdateFailingTest class Drupal\Tests\system\Functional\UpdateSystem core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateFailingTest.php Tests hook_post_update() when there are failing update hooks.
UpdatePostUpdateTest class Drupal\Tests\system\Functional\UpdateSystem core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateTest.php Tests hook_post_update().
UpdateProcessor class Drupal\update core/modules/update/src/UpdateProcessor.php Process project update information. 2
UpdateProcessorInterface interface Drupal\update core/modules/update/src/UpdateProcessorInterface.php Processor of project update information. 1
Updater class Drupal\Core\Updater core/lib/Drupal/Core/Updater/Updater.php Defines the base class for Updaters used in Drupal. 2 4
UpdateReady class Drupal\update\Form core/modules/update/src/Form/UpdateReady.php Configure update settings for this site. 1
UpdateRegistry class Drupal\Core\Update core/lib/Drupal/Core/Update/UpdateRegistry.php Provides all and missing update implementations. 2 2
UpdateRegistryFactory class Drupal\Core\Update core/lib/Drupal/Core/Update/UpdateRegistryFactory.php Service factory for the update registry. 2
UpdateRegistryTest class Drupal\Tests\Core\Update core/tests/Drupal/Tests/Core/Update/UpdateRegistryTest.php @coversDefaultClass \Drupal\Core\Update\UpdateRegistry @group Update
UpdateRemovedPostUpdateTest class Drupal\Tests\system\Functional\UpdateSystem core/modules/system/tests/src/Functional/UpdateSystem/UpdateRemovedPostUpdateTest.php Tests hook_removed_post_updates().
UpdateReportTest class Drupal\Tests\update\Kernel core/modules/update/tests/src/Kernel/UpdateReportTest.php Tests update report functionality.
UpdaterException class Drupal\Core\Updater core/lib/Drupal/Core/Updater/UpdaterException.php Defines an Exception class for the Drupal\Core\Updater\Updater class hierarchy. 1 1
UpdaterFileTransferException class Drupal\Core\Updater core/lib/Drupal/Core/Updater/UpdaterFileTransferException.php Defines a child class of Drupal\Core\Updater\UpdaterException that indicates a Drupal\Core\FileTransfer\FileTransfer exception.
UpdaterInterface interface Drupal\Core\Updater core/lib/Drupal/Core/Updater/UpdaterInterface.php Defines an interface for a class which can update a Drupal project. 2
UpdateRootFactory class Drupal\update core/modules/update/src/UpdateRootFactory.php Gets the root path used by the Update Manager to install or update projects. 2
UpdaterTest class Drupal\KernelTests\Core\Updater core/tests/Drupal/KernelTests/Core/Updater/UpdaterTest.php Tests InfoParser class and exception.
UpdateSchemaTest class Drupal\KernelTests\Core\Extension core/tests/Drupal/KernelTests/Core/Extension/UpdateSchemaTest.php Tests for schema and update includes.
UpdateSchemaTest class Drupal\Tests\system\Functional\UpdateSystem core/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php Tests that update hooks are properly run.
UpdateScriptTest class Drupal\Tests\system\Functional\UpdateSystem core/modules/system/tests/src/Functional/UpdateSystem/UpdateScriptTest.php Tests the update script access and functionality.
UpdateScriptTestController class Drupal\update_script_test\Controller core/modules/system/tests/modules/update_script_test/src/Controller/UpdateScriptTestController.php Controller routines for update_script_test routes.
UpdateSelectionCommand class Drupal\media_library\Ajax core/modules/media_library/src/Ajax/UpdateSelectionCommand.php AJAX command for adding media items to the media library selection. 1
UpdateSemverContribTest class Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateSemverContribTest.php Tests the Update Manager module with a contrib module with semver versions.
UpdateSemverCoreTest class Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php Tests the Update Manager module through a series of functional tests using mock XML data.
UpdateSemverTestBase abstract class Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateSemverTestBase.php Common test methods for projects that use semver version releases. 2
UpdateServiceProvider class Drupal\Core\Update core/lib/Drupal/Core/Update/UpdateServiceProvider.php Customizes the container for running updates.
UpdateSettings class Drupal\update\Plugin\migrate\source core/modules/update/src/Plugin/migrate/source/UpdateSettings.php Drupal 6/7 Update settings source from database.
UpdateSettingsForm class Drupal\update core/modules/update/src/UpdateSettingsForm.php Configure update settings for this site. 1
UpdatesWith7xTest class Drupal\Tests\system\Functional\UpdateSystem core/modules/system/tests/src/Functional/UpdateSystem/UpdatesWith7xTest.php Tests that the minimum schema version is correct even if only 7.x update hooks are retained .
UpdateTest class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/UpdateTest.php Tests the update query builder.
UpdateTestArchiver class Drupal\update_test\Plugin\Archiver core/modules/update/tests/modules/update_test/src/Plugin/Archiver/UpdateTestArchiver.php Defines a test archiver implementation.
UpdateTestBase abstract class Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateTestBase.php Defines some shared functions used by all update tests. 5
UpdateTestController class Drupal\update_test\Controller core/modules/update/tests/modules/update_test/src/Controller/UpdateTestController.php Provides different routes of the update_test module.
UpdateUploadTest class Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateUploadTest.php Tests the Update Manager module's upload and extraction functionality.
Upgrade6Test class Drupal\Tests\migrate_drupal_ui\Functional\d6 core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6Test.php Tests Drupal 6 upgrade using the migrate UI.
Upgrade7Test class Drupal\Tests\migrate_drupal_ui\Functional\d7 core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7Test.php Tests Drupal 7 upgrade using the migrate UI.
Upload class Drupal\file\Plugin\migrate\source\d6 core/modules/file/src/Plugin/migrate/source/d6/Upload.php Drupal 6 upload source from database.

Pages

Other projects