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
UpdateSemverCoreTest class Drupal\Tests\update\Functional core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php Tests the semantic version handling in the Update Manager.
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
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. 4
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.
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.
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.
Upgrade7Test class Drupal\Tests\rdf\Functional\Migrate core/modules/rdf/tests/src/Functional/Migrate/Upgrade7Test.php Tests Drupal 7 upgrade using the migrate UI.
UpgradeTest class Drupal\Tests\aggregator\Functional\migrate_drupal_ui\d6 core/modules/aggregator/tests/src/Functional/migrate_drupal_ui/d6/UpgradeTest.php Tests Drupal 6 upgrade using the migrate UI.
UpgradeTest class Drupal\Tests\aggregator\Functional\migrate_drupal_ui\d7 core/modules/aggregator/tests/src/Functional/migrate_drupal_ui/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.
UploadedFileInterface interface Drupal\file\Upload core/modules/file/src/Upload/UploadedFileInterface.php Provides an interface for uploaded files. 1 1
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\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\mysql\Driver\Database\mysql core/modules/mysql/src/Driver/Database/mysql/Upsert.php MySQL implementation of \Drupal\Core\Database\Query\Upsert. 3 3
Upsert class Drupal\corefake\Driver\Database\corefakeWithAllCustomClasses core/tests/fixtures/database_drivers/module/corefake/src/Driver/Database/corefakeWithAllCustomClasses/Upsert.php CorefakeWithAllCustomClasses implementation of \Drupal\Core\Database\Upsert.
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
Upsert abstract class Drupal\Core\Database\Query core/lib/Drupal/Core/Database/Query/Upsert.php General class for an abstracted "Upsert" (UPDATE or INSERT) query operation. 4 5
Upsert class Drupal\driver_test\Driver\Database\DrivertestMysql core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysql/Upsert.php MySQL test implementation of \Drupal\Core\Database\Query\Upsert.
Upsert class Drupal\driver_test\Driver\Database\DrivertestMysqlDeprecatedVersion core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestMysqlDeprecatedVersion/Upsert.php MySQL test implementation of \Drupal\Core\Database\Query\Upsert.
Upsert class Drupal\driver_test\Driver\Database\DrivertestPgsql core/modules/system/tests/modules/driver_test/src/Driver/Database/DrivertestPgsql/Upsert.php PostgreSQL implementation of \Drupal\Core\Database\Query\Upsert.
Upsert class Drupal\pgsql\Driver\Database\pgsql core/modules/pgsql/src/Driver/Database/pgsql/Upsert.php PostgreSQL implementation of \Drupal\Core\Database\Query\Upsert. 2 2
UpsertTest class Drupal\KernelTests\Core\Database core/tests/Drupal/KernelTests/Core/Database/UpsertTest.php Tests the Upsert query builder.
Uri class Drupal\Core\TypedData\Plugin\DataType core/lib/Drupal/Core/TypedData/Plugin/DataType/Uri.php The URI data type. 1 1
UriDependentTestImageEffect class Drupal\image_module_test\Plugin\ImageEffect core/modules/image/tests/modules/image_module_test/src/Plugin/ImageEffect/UriDependentTestImageEffect.php Performs an image operation that depends on the URI of the original image.
UriInterface interface Drupal\Core\TypedData\Type core/lib/Drupal/Core/TypedData/Type/UriInterface.php Interface for URIs. 1 3
UriItem class Drupal\Core\Field\Plugin\Field\FieldType core/lib/Drupal/Core/Field/Plugin/Field/FieldType/UriItem.php Defines the 'uri' entity field type. 1 2
UriItemTest class Drupal\Tests\field\Kernel\Uri core/modules/field/tests/src/Kernel/Uri/UriItemTest.php Tests URI field functionality.
UriLinkFormatter class Drupal\Core\Field\Plugin\Field\FieldFormatter core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/UriLinkFormatter.php Plugin implementation of the 'uri_link' formatter.
UriWidget class Drupal\Core\Field\Plugin\Field\FieldWidget core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/UriWidget.php Plugin implementation of the 'uri' widget.
Url class Drupal\Core\Render\Element core/lib/Drupal/Core/Render/Element/Url.php Provides a form element for input of a URL.
Url class Drupal\Core core/lib/Drupal/Core/Url.php Defines an object that holds information about a URL. 1 719
Url class Drupal\views\Plugin\views\field core/modules/views/src/Plugin/views/field/Url.php Field handler to provide simple renderer that turns a URL into a clickable link.
UrlAlias class Drupal\path\Plugin\migrate\source\d6 core/modules/path/src/Plugin/migrate/source/d6/UrlAlias.php Drupal 6 URL aliases source from database.
UrlAlias class Drupal\path\Plugin\migrate\source\d7 core/modules/path/src/Plugin/migrate/source/d7/UrlAlias.php Drupal 7 URL aliases source from database.
UrlAliasBase abstract class Drupal\path\Plugin\migrate\source core/modules/path/src/Plugin/migrate/source/UrlAliasBase.php Base class for the url_alias source plugins. 2 2
UrlAliasLanguage

in drupal:9.3.0 and is removed from drupal:10.0.0. No direct replacement is provided.

class Drupal\path\Plugin\migrate\process\d6 core/modules/path/src/Plugin/migrate/process/d6/UrlAliasLanguage.php Url alias language code process. 1
UrlAliasLanguageDeprecatedTest class Drupal\Tests\path\Unit\migrate\process\d6 core/modules/path/tests/src/Unit/migrate/process/d6/UrlAliasLanguageDeprecatedTest.php Tests error message from deprecated UrlAliasLanguage process plugin.

Other projects


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