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
UrlAliasTest class Drupal\Tests\path\Kernel\Plugin\migrate\source\d6 core/modules/path/tests/src/Kernel/Plugin/migrate/source/d6/UrlAliasTest.php Tests the d6_url_alias source plugin.
UrlAliasTest class Drupal\Tests\path\Kernel\Plugin\migrate\source\d7 core/modules/path/tests/src/Kernel/Plugin/migrate/source/d7/UrlAliasTest.php Tests the d7_url_alias source plugin.
UrlAlterFunctionalTest class Drupal\Tests\path_alias\Functional core/modules/path_alias/tests/src/Functional/UrlAlterFunctionalTest.php Tests altering the inbound path and the outbound path.
UrlAlterTest class Drupal\KernelTests\Core\Path core/tests/Drupal/KernelTests/Core/Path/UrlAlterTest.php Tests the capability to alter URLs.
UrlBubbleableMetadataBubblingTest class Drupal\Tests\system\Functional\Render core/modules/system/tests/src/Functional/Render/UrlBubbleableMetadataBubblingTest.php Tests that URL bubbleable metadata is correctly bubbled.
UrlCacheContext class Drupal\Core\Cache\Context core/lib/Drupal/Core/Cache/Context/UrlCacheContext.php Defines the UrlCacheContext service, for "per page" caching. 2
UrlConversionTest class Drupal\Tests\Core\Database core/tests/Drupal/Tests/Core/Database/UrlConversionTest.php Tests for database URL to/from database connection array conversions.
UrlEncode class Drupal\migrate\Plugin\migrate\process core/modules/migrate/src/Plugin/migrate/process/UrlEncode.php URL-encodes the input value. 1
UrlEncodeTest class Drupal\Tests\migrate\Unit\process core/modules/migrate/tests/src/Unit/process/UrlEncodeTest.php @coversDefaultClass \Drupal\migrate\Plugin\migrate\process\UrlEncode[[api-linebreak]] @group file
UrlGenerator class Drupal\Core\Routing core/lib/Drupal/Core/Routing/UrlGenerator.php Generates URLs from route names and parameters. 1 2 2
UrlGeneratorInterface interface Drupal\Core\Routing core/lib/Drupal/Core/Routing/UrlGeneratorInterface.php Defines an interface for generating a URL from a route or system path. 3 16
UrlGeneratorTest class Drupal\Tests\Core\Routing core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php Confirm that the UrlGenerator is functioning properly. 1 1
UrlHelper class Drupal\Component\Utility core/lib/Drupal/Component/Utility/UrlHelper.php Helper class URL based methods. 69
UrlHelperTest class Drupal\Tests\Component\Utility core/tests/Drupal/Tests/Component/Utility/UrlHelperTest.php @group Utility
UrlIntegrationTest class Drupal\KernelTests\Core\Routing core/tests/Drupal/KernelTests/Core/Routing/UrlIntegrationTest.php Tests the URL object integration into the access system.
UrlMatcher class Drupal\Core\Routing core/lib/Drupal/Core/Routing/UrlMatcher.php Drupal-specific URL Matcher; handles the Drupal "system path" mapping. 1
UrlPlainFormatter class Drupal\file\Plugin\Field\FieldFormatter core/modules/file/src/Plugin/Field/FieldFormatter/UrlPlainFormatter.php Plugin implementation of the 'file_url_plain' formatter.
UrlResolver class Drupal\media\OEmbed core/modules/media/src/OEmbed/UrlResolver.php Converts oEmbed media URLs into endpoint-specific resource URLs. 1 2 2
UrlResolver class Drupal\media_test_oembed core/modules/media/tests/modules/media_test_oembed/src/UrlResolver.php Overrides the oEmbed URL resolver service for testing purposes. 1
UrlResolverInterface interface Drupal\media\OEmbed core/modules/media/src/OEmbed/UrlResolverInterface.php Defines the interface for the oEmbed URL resolver service. 1 7
UrlResolverTest class Drupal\Tests\media\Kernel core/modules/media/tests/src/Kernel/UrlResolverTest.php @coversDefaultClass \Drupal\media\OEmbed\UrlResolver[[api-linebreak]]
UrlResolverTest class Drupal\Tests\media\Functional core/modules/media/tests/src/Functional/UrlResolverTest.php Tests the oEmbed URL resolver service.
UrlTest class Drupal\Tests\Core core/tests/Drupal/Tests/Core/UrlTest.php @coversDefaultClass \Drupal\Core\Url[[api-linebreak]] @group UrlTest
UrlTest class Drupal\Tests\system\Kernel\Common core/modules/system/tests/src/Kernel/Common/UrlTest.php Tests the Url object.
UrlTest class Drupal\Tests\system\Functional\Form core/modules/system/tests/src/Functional/Form/UrlTest.php Tests the form API URL element.
UrlTest class Drupal\Tests\system\Functional\Common core/modules/system/tests/src/Functional/Common/UrlTest.php Confirm that the link generator works correctly.
UrlTransformRelativeTest class Drupal\KernelTests\Core\File core/tests/Drupal/KernelTests/Core/File/UrlTransformRelativeTest.php Tests URL transform to relative.
UsageTest class Drupal\Tests\file\Kernel core/modules/file/tests/src/Kernel/UsageTest.php Tests file usage functions.
UseCacheBackendTrait trait Drupal\Core\Cache core/lib/Drupal/Core/Cache/UseCacheBackendTrait.php Provides methods to use a cache backend while respecting a 'use caches' flag. 4
User class Drupal\user\Entity core/modules/user/src/Entity/User.php Defines the user entity class. 1 172
User class Drupal\user\Plugin\views\argument_validator core/modules/user/src/Plugin/views/argument_validator/User.php Validate whether an argument is a valid user. 1
User class Drupal\user\Plugin\views\argument_default core/modules/user/src/Plugin/views/argument_default/User.php Default argument plugin to extract a user from request.
User class Drupal\user\Plugin\migrate\source\d6 core/modules/user/src/Plugin/migrate/source/d6/User.php Drupal 6 user source from database.
User class Drupal\user\Plugin\migrate\source\d7 core/modules/user/src/Plugin/migrate/source/d7/User.php Drupal 7 user source from database.
User class Drupal\user\Plugin\migrate core/modules/user/src/Plugin/migrate/User.php Plugin class for Drupal 7 user migrations dealing with fields and profiles. 2
UserAccessControlHandler class Drupal\user core/modules/user/src/UserAccessControlHandler.php Defines the access control handler for the user entity type. 1
UserAccessControlHandlerTest class Drupal\Tests\user\Unit core/modules/user/tests/src/Unit/UserAccessControlHandlerTest.php Tests the user access controller.
UserAccountFormFieldsTest class Drupal\Tests\user\Kernel core/modules/user/tests/src/Kernel/UserAccountFormFieldsTest.php Verifies the field order in user account forms.
UserAccountFormPasswordResetTest class Drupal\Tests\user\Kernel core/modules/user/tests/src/Kernel/UserAccountFormPasswordResetTest.php Verifies that the password reset behaves as expected with form elements.
UserAccountLinksTest class Drupal\Tests\user\Functional core/modules/user/tests/src/Functional/UserAccountLinksTest.php Tests user-account links.
UserActionConfigSchemaTest class Drupal\Tests\user\Kernel core/modules/user/tests/src/Kernel/UserActionConfigSchemaTest.php Tests that the config schema is valid when roles are added or removed.
UserAdminLanguageTest class Drupal\Tests\user\Functional core/modules/user/tests/src/Functional/UserAdminLanguageTest.php Tests users' ability to change their own administration language.
UserAdminListingTest class Drupal\Tests\user\Functional core/modules/user/tests/src/Functional/UserAdminListingTest.php Tests the user admin listing if views is not enabled.
UserAdminSettingsFormTest class Drupal\Tests\user\Kernel core/modules/user/tests/src/Kernel/UserAdminSettingsFormTest.php Configuration object user.mail and user.settings save test.
UserAdminTest class Drupal\Tests\user\Functional core/modules/user/tests/src/Functional/UserAdminTest.php Tests user administration page functionality.
UserAgent class Drupal\Component\Utility core/lib/Drupal/Component/Utility/UserAgent.php Provides user agent related utility functions. 3
UserAgentTest class Drupal\Tests\Component\Utility core/tests/Drupal/Tests/Component/Utility/UserAgentTest.php Tests bytes size parsing helper methods.
UserAttributesTest class Drupal\Tests\rdf\Functional core/modules/rdf/tests/src/Functional/UserAttributesTest.php Tests the RDFa markup of Users.
UserAuth class Drupal\user core/modules/user/src/UserAuth.php Validates user authentication credentials. 1 2
UserAuthenticationController class Drupal\user\Controller core/modules/user/src/Controller/UserAuthenticationController.php Provides controllers for login, login status and logout via HTTP requests. 2

Other projects


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