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
UntrustedObject class Drupal\Tests\Core\Security core/tests/Drupal/Tests/Core/Security/DoTrustedCallbackTraitTest.php Class representing untrusted callback.
UnversionedAssetsTestHooks class Drupal\unversioned_assets_test\Hook core/modules/system/tests/modules/unversioned_assets_test/src/Hook/UnversionedAssetsTestHooks.php Hook implementations for unversioned_assets_test.
UnversionedAssetTest class Drupal\FunctionalTests\Asset core/tests/Drupal/FunctionalTests/Asset/UnversionedAssetTest.php Tests asset aggregation.
UpcastingTest class Drupal\Tests\system\Functional\ParamConverter core/modules/system/tests/src/Functional/ParamConverter/UpcastingTest.php Tests upcasting of URL arguments to entities.
Update class Drupal\Core\Database\Query core/lib/Drupal/Core/Database/Query/Update.php General class for an abstracted UPDATE operation. 2 4
Update class Drupal\pgsql\Driver\Database\pgsql core/modules/pgsql/src/Driver/Database/pgsql/Update.php PostgreSQL implementation of \Drupal\Core\Database\Query\Update.
Update class Drupal\core_fake\Driver\Database\CoreFakeWithAllCustomClasses core/tests/fixtures/database_drivers/module/core_fake/src/Driver/Database/CoreFakeWithAllCustomClasses/Update.php CoreFakeWithAllCustomClasses implementation of \Drupal\Core\Database\Update.
UpdateBackend class Drupal\Core\Update core/lib/Drupal/Core/Update/UpdateBackend.php Defines a cache backend for use during Drupal database updates.
UpdateBlockForm class Drupal\layout_builder\Form core/modules/layout_builder/src/Form/UpdateBlockForm.php Provides a form to update a block. 1
UpdateBuildIdCommand class Drupal\Core\Ajax core/lib/Drupal/Core/Ajax/UpdateBuildIdCommand.php Ajax command for updating the form build ID. 2
UpdateCacheBackendFactory class Drupal\Core\Update core/lib/Drupal/Core/Update/UpdateCacheBackendFactory.php Cache factory implementation for use during Drupal database updates.
UpdateCacheTest class Drupal\Tests\system\Functional\UpdateSystem core/modules/system/tests/src/Functional/UpdateSystem/UpdateCacheTest.php Tests caches during updates.
UpdateCalculateProjectDataTest class Drupal\Tests\update\Kernel core/modules/update/tests/src/Kernel/UpdateCalculateProjectDataTest.php Test the values set in update_calculate_project_data().
UpdateCompilerPass class Drupal\Core\Update core/lib/Drupal/Core/Update/UpdateCompilerPass.php Removes services with unmet dependencies.
UpdateComplexTest class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/UpdateComplexTest.php Tests the Update query builder, complex queries.
UpdateContribTest class Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateContribTest.php Tests how Update Status handles contributed modules and themes.
UpdateController class Drupal\update\Controller core/modules/update/src/Controller/UpdateController.php Controller routines for update routes.
UpdateCronHooks class Drupal\update\Hook core/modules/update/src/Hook/UpdateCronHooks.php Hook implementations for update.
UpdateDataSubscriber final class Drupal\package_manager\EventSubscriber core/modules/package_manager/src/EventSubscriber/UpdateDataSubscriber.php Clears stale update data once staged changes have been applied.
UpdateDescriptionTest class Drupal\KernelTests\Core\Extension core/tests/Drupal/KernelTests/Core/Extension/UpdateDescriptionTest.php Tests for update descriptions.
UpdateEmptyEmailsUpdatePathTest class Drupal\Tests\update\Functional\Update core/modules/update/tests/src/Functional/Update/UpdateEmptyEmailsUpdatePathTest.php Tests update_post_update_fix_update_emails.
UpdateException class Drupal\Core\Utility core/lib/Drupal/Core/Utility/UpdateException.php Exception class used to throw error if a module update fails. 2
UpdateFetcher class Drupal\update core/modules/update/src/UpdateFetcher.php Fetches project information from remote locations. 1 2
UpdateFetcherInterface interface Drupal\update core/modules/update/src/UpdateFetcherInterface.php Fetches project information from remote locations. 1 8
UpdateFetcherTest class Drupal\Tests\update\Unit core/modules/update/tests/src/Unit/UpdateFetcherTest.php Tests update functionality unrelated to the database.
UpdateHookRegistry class Drupal\Core\Update core/lib/Drupal/Core/Update/UpdateHookRegistry.php Provides module updates versions handling. 5 2
UpdateHookRegistryTest class Drupal\Tests\Core\Update core/tests/Drupal/Tests/Core/Update/UpdateHookRegistryTest.php Tests Drupal\Core\Update\UpdateHookRegistry.
UpdateHooks class Drupal\update\Hook core/modules/update/src/Hook/UpdateHooks.php Hook implementations for update. 1
UpdateKernel class Drupal\Core\Update core/lib/Drupal/Core/Update/UpdateKernel.php Defines a kernel which is used primarily to run the update of Drupal. 4
UpdateLobTest class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/UpdateLobTest.php Tests the Update query builder with LOB fields.
UpdateLocalTasksTest class Drupal\Tests\update\Unit\Menu core/modules/update/tests/src/Unit/Menu/UpdateLocalTasksTest.php Tests existence of update local tasks.
UpdateMailTest class Drupal\Tests\update\Unit core/modules/update/tests/src/Unit/UpdateMailTest.php Tests text of update email.
UpdateManager class Drupal\update core/modules/update/src/UpdateManager.php Default implementation of UpdateManagerInterface. 2
UpdateManagerInterface interface Drupal\update core/modules/update/src/UpdateManagerInterface.php Manages project update information. 1 14
UpdateMiscTest class Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateMiscTest.php Tests general functionality of the Update Status module.
UpdateOrderingTest class Drupal\Tests\Core\Update core/tests/Drupal/Tests/Core/Update/UpdateOrderingTest.php Tests update ordering. 1
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. 35 34
UpdatePathTestBaseFilledTest class Drupal\Tests\system\Functional\UpdateSystem core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php Runs UpdatePathTestBase with a dump filled with content.
UpdatePathTestBaseTest class Drupal\FunctionalTests\Update core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBaseTest.php Tests the update path base class.
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. 14
UpdatePathWithBrokenRoutingTest class Drupal\Tests\system\Functional\UpdateSystem core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathWithBrokenRoutingTest.php Tests the update path with a broken router.
UpdatePostUpdateExceptionTest class Drupal\Tests\system\Functional\UpdateSystem core/modules/system/tests/src/Functional/UpdateSystem/UpdatePostUpdateExceptionTest.php Tests hook_post_update() when there is an exception in a post update.
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. 1 1 2
UpdateProcessorInterface interface Drupal\update core/modules/update/src/UpdateProcessorInterface.php Processor of project update information. 1 1
UpdateReducedThemeRegistryTest class Drupal\FunctionalTests\Update core/tests/Drupal/FunctionalTests/Update/UpdateReducedThemeRegistryTest.php Tests that update.php is accessible even if there are unstable modules.

Other projects


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