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 |
|---|---|---|---|---|---|---|---|
| UserEntityLabelTest | class |
Drupal\ |
core/ |
Tests the label callback. | |||
| UserEntityReferenceTest | class |
Drupal\ |
core/ |
Tests the user reference field functionality. | |||
| UserEntityTest | class |
Drupal\ |
core/ |
Tests the user entity class. | |||
| UserEntityTranslation | class |
Drupal\ |
core/ |
Provides Drupal 7 user entity translations source plugin. | |||
| UserEntityTranslationTest | class |
Drupal\ |
core/ |
Tests D7 user entity translation source plugin. | |||
| UserEvents | final class |
Drupal\ |
core/ |
Defines events for the user module. | 2 | ||
| UserFieldsAccessChangeTest | class |
Drupal\ |
core/ |
Checks changing entity and field access. | |||
| UserFieldsTest | class |
Drupal\ |
core/ |
Tests available user fields in twig. | |||
| UserFloodControl | class |
Drupal\ |
core/ |
User Flood Control service. | 2 | ||
| UserFloodControlInterface | interface |
Drupal\ |
core/ |
Defines an interface for user flood controllers. | 1 | 2 | |
| UserFloodEvent | class |
Drupal\ |
core/ |
Provides a user flood event for event listeners. | 2 | ||
| UserFloodSubscriber | class |
Drupal\ |
core/ |
Logs details of User Flood Control events. | 2 | ||
| UserHalJsonAnonTest | class |
Drupal\ |
core/ |
@group hal | 2 | ||
| UserHalJsonBasicAuthTest | class |
Drupal\ |
core/ |
@group hal | |||
| UserHalJsonCookieTest | class |
Drupal\ |
core/ |
@group hal | |||
| UserHelpersTest | class |
Drupal\ |
core/ |
Tests User related helper methods of BrowserTestBase. | |||
| UserInstallTest | class |
Drupal\ |
core/ |
Tests user_install(). | |||
| UserInterface | interface |
Drupal\ |
core/ |
Provides an interface defining a user entity. | 1 | 57 | |
| UserJsonAnonTest | class |
Drupal\ |
core/ |
@group rest | |||
| UserJsonBasicAuthTest | class |
Drupal\ |
core/ |
@group rest | |||
| UserJsonCookieTest | class |
Drupal\ |
core/ |
@group rest | |||
| UserKernelTestBase | abstract class |
Drupal\ |
core/ |
Provides a common test base for user views tests. | 4 | ||
| UserLangcode | class |
Drupal\ |
core/ |
Provides a process plugin for the user langcode. | |||
| UserLanguageCreationTest | class |
Drupal\ |
core/ |
Tests whether proper language is stored for new users and access to language selector. | |||
| UserLanguageTest | class |
Drupal\ |
core/ |
Functional tests for a user's ability to change their default language. | |||
| UserLegacyTest | class |
Drupal\ |
core/ |
Tests legacy user functionality. | |||
| UserListBuilder | class |
Drupal\ |
core/ |
Defines a class to build a listing of user entities. | |||
| UserLocalTasksTest | class |
Drupal\ |
core/ |
Tests user local tasks. | |||
| UserLoginBlock | class |
Drupal\ |
core/ |
Provides a 'User login' block. | |||
| UserLoginForm | class |
Drupal\ |
core/ |
Provides a user login form. | 1 | 1 | |
| UserLoginFormTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\user\Form\UserLoginForm @group user | |||
| UserLoginHttpTest | class |
Drupal\ |
core/ |
Tests login and password reset via direct HTTP. | |||
| UserLoginTest | class |
Drupal\ |
core/ |
Ensure that login works as expected. | |||
| UserMailDefaultsTest | class |
Drupal\ |
core/ |
Tests that user.mail default settings are parsed correctly. | |||
| UserMailNotifyTest | class |
Drupal\ |
core/ |
Tests _user_mail_notify() use of user.settings.notify.*. | |||
| UserMailRequired | class |
Drupal\ |
core/ |
Checks if the user's email address is provided if required. | 1 | ||
| UserMailRequiredValidator | class |
Drupal\ |
core/ |
Checks if the user's email address is provided if required. | 1 | ||
| UserMailRequiredValidatorTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\user\Plugin\Validation\Constraint\UserMailRequiredValidator @group user | |||
| UserMailUnique | class |
Drupal\ |
core/ |
Checks if a user's email address is unique on the site. | |||
| UserMigrationClassTest | class |
Drupal\ |
core/ |
Tests the user migration plugin class. | |||
| UserMultipleCancelConfirm | class |
Drupal\ |
core/ |
Provides a confirmation form for cancelling multiple user accounts. | 1 | ||
| UserName | class |
Drupal\ |
core/ |
Validates whether a user name is valid. | |||
| UserNameConstraint | class |
Drupal\ |
core/ |
Checks if a value is a valid user name. | 1 | ||
| UserNameConstraintValidator | class |
Drupal\ |
core/ |
Validates the UserName constraint. | |||
| UserNameFormatter | class |
Drupal\ |
core/ |
Plugin implementation of the 'user_name' formatter. | |||
| UserNameFormatterTest | class |
Drupal\ |
core/ |
Tests the user_name formatter. | |||
| UserNameItem | class |
Drupal\ |
core/ |
Defines a custom field item class for the 'name' user entity field. | |||
| UserNameUnique | class |
Drupal\ |
core/ |
Checks if a user name is unique on the site. | |||
| UserPasswordForm | class |
Drupal\ |
core/ |
Provides a user password reset form. | 1 | ||
| UserPasswordResetForm | class |
Drupal\ |
core/ |
Form controller for the user password forms. | 1 |