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
|
Name |
Type | Namespace | Location | Description | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|
| UrlTest | class |
Drupal\ |
core/ |
Tests the form API URL element. | |||
| UrlTransformRelativeTest | class |
Drupal\ |
core/ |
Tests url transform to relative. | |||
| UsageTest | class |
Drupal\ |
core/ |
Tests file usage functions. | |||
| UseCacheBackendTrait | trait |
Drupal\ |
core/ |
Provides methods to use a cache backend while respecting a 'use caches' flag. | 4 | ||
| User | class |
Drupal\ |
core/ |
Drupal 7 user source from database. | |||
| User | class |
Drupal\ |
core/ |
Default argument plugin to extract a user from request. | |||
| User | class |
Drupal\ |
core/ |
Plugin class for Drupal 7 user migrations dealing with fields and profiles. | 2 | ||
| User | class |
Drupal\ |
core/ |
Validate whether an argument is a valid user. | 1 | ||
| User | class |
Drupal\ |
core/ |
Defines the user entity class. | 165 | ||
| User | class |
Drupal\ |
core/ |
Drupal 6 user source from database. | |||
| UserAccessControlHandler | class |
Drupal\ |
core/ |
Defines the access control handler for the user entity type. | 1 | ||
| UserAccessControlHandlerTest | class |
Drupal\ |
core/ |
Tests the user access controller. | |||
| UserAccountFormFieldsTest | class |
Drupal\ |
core/ |
Verifies that the field order in user account forms is compatible with password managers of web browsers. | |||
| UserAccountFormPasswordResetTest | class |
Drupal\ |
core/ |
Verifies that the password reset behaves as expected with form elements. | |||
| UserAccountLinksTest | class |
Drupal\ |
core/ |
Tests user-account links. | |||
| UserActionConfigSchemaTest | class |
Drupal\ |
core/ |
Ensures the user action for adding and removing roles have valid config schema. | |||
| UserAdminLanguageTest | class |
Drupal\ |
core/ |
Tests users' ability to change their own administration language. | |||
| UserAdminListingTest | class |
Drupal\ |
core/ |
Tests the user admin listing if views is not enabled. | |||
| UserAdminSettingsFormTest | class |
Drupal\ |
core/ |
Configuration object user.mail and user.settings save test. | |||
| UserAdminTest | class |
Drupal\ |
core/ |
Tests user administration page functionality. | |||
| UserAgent | class |
Drupal\ |
core/ |
Provides user agent related utility functions. | 3 | ||
| UserAgentTest | class |
Drupal\ |
core/ |
Tests bytes size parsing helper methods. | |||
| UserAttributesTest | class |
Drupal\ |
core/ |
Tests the RDFa markup of Users. | |||
| UserAuth | class |
Drupal\ |
core/ |
Validates user authentication credentials. | 1 | 2 | |
| UserAuthenticationController | class |
Drupal\ |
core/ |
Provides controllers for login, login status and logout via HTTP requests. | 2 | ||
| UserAuthenticationControllerTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\user\Controller\UserController @group user | |||
| UserAuthInterface | interface |
Drupal\ |
core/ |
An interface for validating user authentication credentials. | 1 | 5 | |
| UserAuthTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\user\UserAuth @group user | |||
| UserBatchActionTest | class |
Drupal\ |
core/ |
Tests the views bulk form with batch action. | |||
| UserBlocksTest | class |
Drupal\ |
core/ |
Tests user blocks. | |||
| UserBulkForm | class |
Drupal\ |
core/ |
Defines a user operations bulk form element. | 1 | ||
| UserBulkFormTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\user\Plugin\views\field\UserBulkForm @group user | |||
| UserCacheContext | class |
Drupal\ |
core/ |
Defines the UserCacheContext service, for "per user" caching. | 2 | ||
| UserCacheContextBase | abstract class |
Drupal\ |
core/ |
Base class for user-based cache contexts. | 5 | 1 | |
| UserCacheTagsTest | class |
Drupal\ |
core/ |
Tests the User entity's cache tags. | |||
| UserCancelForm | class |
Drupal\ |
core/ |
Provides a confirmation form for cancelling user account. | |||
| UserCancelTest | class |
Drupal\ |
core/ |
Ensure that account cancellation methods work as expected. | |||
| UserChangedTest | class |
Drupal\ |
core/ |
Tests the changed field. | |||
| UserController | class |
Drupal\ |
core/ |
Controller routines for user routes. | |||
| UserCreateFailMailTest | class |
Drupal\ |
core/ |
Tests the create user administration page. | |||
| UserCreateTest | class |
Drupal\ |
core/ |
Tests the create user administration page. | |||
| UserCreationTrait | trait |
Drupal\ |
core/ |
Provides methods to create additional test users and switch the currently logged in one. | 74 | ||
| UserData | class |
Drupal\ |
core/ |
Provides access to the user data service. | |||
| UserData | class |
Drupal\ |
core/ |
Defines the user data service. | 1 | 2 | |
| UserData | class |
Drupal\ |
core/ |
Plugin annotation @MigrateDestination( id = "user_data" ) | 1 | ||
| UserDataInterface | interface |
Drupal\ |
core/ |
Defines the user data service interface. | 1 | 3 | |
| UserDataTest | class |
Drupal\ |
core/ |
Tests the user data service field handler. | |||
| UserDeleteTest | class |
Drupal\ |
core/ |
Tests deleting of user accounts. | |||
| UserEditedOwnAccountTest | class |
Drupal\ |
core/ |
Tests user edited own account can still log in. | |||
| UserEditTest | class |
Drupal\ |
core/ |
Tests user edit page. |