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
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
UpdateSemverContribBaselineTest class Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateSemverContribBaselineTest.php Tests the Update Manager module with a contrib module with semver versions.
UpdateSemverContribSecurityAvailabilityTest class Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateSemverContribSecurityAvailabilityTest.php Tests Update Manager with a security update available for a contrib project.
UpdateSemverContribTestBase class Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateSemverContribTestBase.php Base class for Update manager semantic versioning tests of contrib projects. 2
UpdateSemverCoreBaselineTest class Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateSemverCoreBaselineTest.php Tests semantic version handling in the Update Manager for Drupal core.
UpdateSemverCoreSecurityAvailabilityTest class Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateSemverCoreSecurityAvailabilityTest.php Tests Update Manager with a security update available for Drupal core.
UpdateSemverCoreSecurityCoverageTest class Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateSemverCoreSecurityCoverageTest.php Tests the security coverage messages for Drupal core versions.
UpdateSemverCoreTest class Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php Tests edge cases of the Available Updates report UI.
UpdateSemverCoreTestBase class Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateSemverCoreTestBase.php Base class for Update manager semantic versioning tests of Drupal core. 4
UpdateSemverTestBase abstract class Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateSemverTestBase.php Common setup and utility methods to test projects that use semver releases. 2
UpdateSemverTestBaselineTrait trait Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateSemverTestBaselineTrait.php Provides test methods for semver tests shared between core and contrib.
UpdateSemverTestSecurityAvailabilityTrait trait Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateSemverTestSecurityAvailabilityTrait.php Provides a test and data provider for semver security availability tests.
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.
UpdateSettingsDefaultFetchUrlUpdateTest class Drupal\Tests\update\Functional\Update core/modules/update/tests/src/Functional/Update/UpdateSettingsDefaultFetchUrlUpdateTest.php Tests update of update.settings:fetch.url if it's still the default of "".
UpdateSettingsForm class Drupal\update core/modules/update/src/UpdateSettingsForm.php Configure update settings for this site. 1
UpdateSettingsFormTest class Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateSettingsFormTest.php Tests the update_settings form.
UpdateStorageTest class Drupal\Tests\update\Kernel core/modules/update/tests/src/Kernel/UpdateStorageTest.php Tests the Update module storage is cleared correctly.
UpdatesWith7xTest class Drupal\Tests\system\Functional\UpdateSystem core/modules/system/tests/src/Functional/UpdateSystem/UpdatesWith7xTest.php Tests the minimum schema version when 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.
UpdateTestTrait trait Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateTestTrait.php Provides a trait to set system info and XML mappings.
UpdateUploaderTestBase abstract class Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateUploaderTestBase.php Base test class for tests that test project upload functionality. 2
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. 1
Upgrade6Test class Drupal\Tests\forum\Functional\migrate_drupal\d6 core/modules/forum/tests/src/Functional/migrate_drupal/d6/Upgrade6Test.php Tests Drupal 6 upgrade using the migrate UI.
Upgrade6TestWithContentModeration class Drupal\Tests\migrate_drupal_ui\Functional\d6 core/modules/migrate_drupal_ui/tests/src/Functional/d6/Upgrade6TestWithContentModeration.php Tests Drupal 6 upgrade using the migrate UI with Content Moderation.
Upgrade7Test class Drupal\Tests\forum\Functional\migrate_drupal\d7 core/modules/forum/tests/src/Functional/migrate_drupal/d7/Upgrade7Test.php Tests Drupal 7 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. 1
Upgrade7TestWithContentModeration class Drupal\Tests\migrate_drupal_ui\Functional\d7 core/modules/migrate_drupal_ui/tests/src/Functional/d7/Upgrade7TestWithContentModeration.php Tests Drupal 7 upgrade using the migrate UI with Content Moderation.
UpgradeTest class Drupal\Tests\statistics\Functional\migrate_drupal\d6 core/modules/statistics/tests/src/Functional/migrate_drupal/d6/UpgradeTest.php Tests Drupal 6 upgrade using the migrate UI.
UpgradeTest class Drupal\Tests\statistics\Functional\migrate_drupal\d7 core/modules/statistics/tests/src/Functional/migrate_drupal/d7/UpgradeTest.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.
UploadedFileConstraint class Drupal\file\Validation\Constraint core/modules/file/src/Validation/Constraint/UploadedFileConstraint.php A constraint for UploadedFile objects. 1
UploadedFileConstraintValidator class Drupal\file\Validation\Constraint core/modules/file/src/Validation/Constraint/UploadedFileConstraintValidator.php Constraint validator for uploaded files.
UploadedFileConstraintValidatorTest class Drupal\Tests\file\Kernel\Validation core/modules/file/tests/src/Kernel/Validation/UploadedFileConstraintValidatorTest.php Tests the uploaded file validator.
UploadedFileInterface interface Drupal\file\Upload core/modules/file/src/Upload/UploadedFileInterface.php Provides an interface for uploaded files. 2 2
UploadInstance class Drupal\file\Plugin\migrate\source\d6 core/modules/file/src/Plugin/migrate/source/d6/UploadInstance.php Drupal 6 upload instance source from database.
UploadInstanceTest class Drupal\Tests\file\Kernel\Plugin\migrate\source\d6 core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/UploadInstanceTest.php Tests D6 d6_upload_instance source plugin.
UploadTest class Drupal\Tests\file\Kernel\Plugin\migrate\source\d6 core/modules/file/tests/src/Kernel/Plugin/migrate/source/d6/UploadTest.php Tests D6 d6_upload source plugin.
Upsert class Drupal\mysql\Driver\Database\mysql core/modules/mysql/src/Driver/Database/mysql/Upsert.php MySQL implementation of \Drupal\Core\Database\Query\Upsert. 1 1
Upsert class Drupal\sqlite\Driver\Database\sqlite core/modules/sqlite/src/Driver/Database/sqlite/Upsert.php SQLite implementation of \Drupal\Core\Database\Query\Upsert. 1 1
Upsert class Drupal\pgsql\Driver\Database\pgsql core/modules/pgsql/src/Driver/Database/pgsql/Upsert.php PostgreSQL implementation of \Drupal\Core\Database\Query\Upsert. 1 1
Upsert

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/Upsert.php SQLite implementation of \Drupal\Core\Database\Query\Upsert. 1
Upsert

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/Upsert.php MySQL implementation of \Drupal\Core\Database\Query\Upsert. 1
Upsert

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/Upsert.php PostgreSQL implementation of \Drupal\Core\Database\Query\Upsert. 1

Other projects


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