Classes, traits, and interfaces - main - 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 1529

Name Deprecated Object type Namespace File name Summary Direct uses Use statements Strings
UserMigrationClassTest class Drupal\Tests\user\Kernel\Migrate\d7 core/modules/user/tests/src/Kernel/Migrate/d7/UserMigrationClassTest.php Tests the user migration plugin class.
UserMultipleCancelConfirm class Drupal\user\Form core/modules/user/src/Form/UserMultipleCancelConfirm.php Provides a confirmation form for cancelling multiple user accounts. 1
UserName class Drupal\user\Plugin\views\argument_validator core/modules/user/src/Plugin/views/argument_validator/UserName.php Validates whether a user name is valid.
UserNameConstraint class Drupal\user\Plugin\Validation\Constraint core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraint.php Checks if a value is a valid user name. 1
UserNameConstraintValidator class Drupal\user\Plugin\Validation\Constraint core/modules/user/src/Plugin/Validation/Constraint/UserNameConstraintValidator.php Validates the UserName constraint.
UserNameFormatter class Drupal\user\Plugin\Field\FieldFormatter core/modules/user/src/Plugin/Field/FieldFormatter/UserNameFormatter.php Plugin implementation of the 'user_name' formatter.
UserNameFormatterTest class Drupal\Tests\user\Kernel\Field core/modules/user/tests/src/Kernel/Field/UserNameFormatterTest.php Tests the user_name formatter.
UserNameItem class Drupal\user core/modules/user/src/UserNameItem.php Defines a custom field item class for the 'name' user entity field. 2
UserNameItemTest class Drupal\Tests\user\Unit core/modules/user/tests/src/Unit/UserNameItemTest.php Defines a test for the UserNameItem field-type.
UserNameThemeCacheTest class Drupal\Tests\user\Kernel core/modules/user/tests/src/Kernel/UserNameThemeCacheTest.php Tests the 'username' theme element.
UserNameUnique class Drupal\user\Plugin\Validation\Constraint core/modules/user/src/Plugin/Validation/Constraint/UserNameUnique.php Checks if a user name is unique on the site.
UserNameValidator class Drupal\user core/modules/user/src/UserNameValidator.php Provides a username validator. 3 2
UserNameValidatorTest class Drupal\Tests\user\Kernel core/modules/user/tests/src/Kernel/UserNameValidatorTest.php Verify that user validity checks behave as designed.
UserPassRehashTest class Drupal\Tests\user\Kernel core/modules/user/tests/src/Kernel/UserPassRehashTest.php Tests user_pass_rehash().
UserPasswordForm class Drupal\user\Form core/modules/user/src/Form/UserPasswordForm.php Provides a user password reset form. 1
UserPasswordResetForm class Drupal\user\Form core/modules/user/src/Form/UserPasswordResetForm.php Form controller for the user password forms. 1
UserPasswordResetTest class Drupal\Tests\user\FunctionalJavascript core/modules/user/tests/src/FunctionalJavascript/UserPasswordResetTest.php Ensure that password reset methods work as expected.
UserPasswordResetTest class Drupal\Tests\user\Functional core/modules/user/tests/src/Functional/UserPasswordResetTest.php Ensure that password reset methods work as expected.
UserPathTest class Drupal\Tests\views\Functional core/modules/views/tests/src/Functional/UserPathTest.php Tests overriding user paths using wildcards.
UserPermissionsAdminTest class Drupal\Tests\user\Functional core/modules/user/tests/src/Functional/UserPermissionsAdminTest.php Tests adding and removing permissions via the UI.
UserPermissionsForm class Drupal\user\Form core/modules/user/src/Form/UserPermissionsForm.php Provides the user permissions administration form. 3 1
UserPermissionsModuleSpecificForm class Drupal\user\Form core/modules/user/src/Form/UserPermissionsModuleSpecificForm.php Provides the user permissions administration form for one or more module(s). 1
UserPermissionsRoleSpecificForm class Drupal\user\Form core/modules/user/src/Form/UserPermissionsRoleSpecificForm.php Provides the user permissions administration form for a specific role. 1
UserPermissionsTest class Drupal\Tests\user\FunctionalJavascript core/modules/user/tests/src/FunctionalJavascript/UserPermissionsTest.php Tests the JS components added to the user permissions page.
UserPermissionsTest class Drupal\Tests\user\Functional core/modules/user/tests/src/Functional/UserPermissionsTest.php Verifies role permissions can be added and removed via the permissions page.
UserPicture class Drupal\user\Plugin\migrate\source\d6 core/modules/user/src/Plugin/migrate/source/d6/UserPicture.php Drupal 6 user picture source from database. 1
UserPictureFile class Drupal\user\Plugin\migrate\source\d6 core/modules/user/src/Plugin/migrate/source/d6/UserPictureFile.php Drupal 6 user picture source from database. 1
UserPictureFileTest class Drupal\Tests\user\Kernel\Plugin\migrate\source\d6 core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureFileTest.php Tests the d6_user_picture_file source plugin.
UserPictureInstance class Drupal\user\Plugin\migrate\source core/modules/user/src/Plugin/migrate/source/UserPictureInstance.php Drupal 6/7 user picture field instance source from database. 1
UserPictureInstanceTest class Drupal\Tests\user\Kernel\Plugin\migrate\source core/modules/user/tests/src/Kernel/Plugin/migrate/source/UserPictureInstanceTest.php Tests the user_picture_instance source plugin.
UserPictureTest class Drupal\Tests\user\Kernel\Plugin\migrate\source\d6 core/modules/user/tests/src/Kernel/Plugin/migrate/source/d6/UserPictureTest.php Tests the d6_user_picture source plugin.
UserPictureTest class Drupal\Tests\user\Functional core/modules/user/tests/src/Functional/UserPictureTest.php Tests user picture functionality.
UserReference class Drupal\migrate_drupal\Plugin\migrate\field\d6 core/modules/migrate_drupal/src/Plugin/migrate/field/d6/UserReference.php MigrateField Plugin for Drupal 6 user reference fields.
UserReference class Drupal\migrate_drupal\Plugin\migrate\field\d7 core/modules/migrate_drupal/src/Plugin/migrate/field/d7/UserReference.php MigrateField plugin for Drupal 7 user_reference fields.
UserRegisterFormTest class Drupal\Tests\user\FunctionalJavascript core/modules/user/tests/src/FunctionalJavascript/UserRegisterFormTest.php Tests user registration forms via JS.
UserRegistrationResource class Drupal\user\Plugin\rest\resource core/modules/user/src/Plugin/rest/resource/UserRegistrationResource.php Represents user registration as a resource. 1
UserRegistrationResourceTest class Drupal\Tests\user\Unit core/modules/user/tests/src/Unit/UserRegistrationResourceTest.php Tests User Registration REST resource.
UserRegistrationRestTest class Drupal\Tests\user\Functional core/modules/user/tests/src/Functional/UserRegistrationRestTest.php Tests registration of user using REST.
UserRegistrationTest class Drupal\Tests\user\Functional core/modules/user/tests/src/Functional/UserRegistrationTest.php Tests registration of user under different configurations.
UserRememberRolesFilterSettingTest class Drupal\Tests\views\Functional\Update core/modules/views/tests/src/Functional/Update/UserRememberRolesFilterSettingTest.php Tests the upgrade path for the clean-up of empty remember_roles display settings for views filters.
UserRequestSubscriber class Drupal\user\EventSubscriber core/modules/user/src/EventSubscriber/UserRequestSubscriber.php Updates the current user's last access time. 2
UserRequirements class Drupal\user\Hook core/modules/user/src/Hook/UserRequirements.php Requirements for the User module.
UserRequirementsTest class Drupal\Tests\user\Kernel core/modules/user/tests/src/Kernel/UserRequirementsTest.php Tests user_requirements().
UserRequirementsTest class Drupal\Tests\user\Functional core/modules/user/tests/src/Functional/UserRequirementsTest.php Tests the requirements checks of the User module.
UserResourceTestBase abstract class Drupal\Tests\user\Functional\Rest core/modules/user/tests/src/Functional/Rest/UserResourceTestBase.php Resource test base for the user entity. 6
UserRole class Drupal\user\Plugin\Condition core/modules/user/src/Plugin/Condition/UserRole.php Provides a 'User Role' condition.
UserRoleAdminTest class Drupal\Tests\user\Functional core/modules/user/tests/src/Functional/UserRoleAdminTest.php Tests adding, editing and deleting user roles and changing role weights.
UserRoleConditionTest class Drupal\Tests\user\Kernel\Condition core/modules/user/tests/src/Kernel/Condition/UserRoleConditionTest.php Tests the user role condition.
UserRoleDeleteTest class Drupal\Tests\user\Kernel core/modules/user/tests/src/Kernel/UserRoleDeleteTest.php Tests the handling of user_role entity from the user module.
UserRoleEntityTest class Drupal\Tests\user\Kernel core/modules/user/tests/src/Kernel/UserRoleEntityTest.php Tests Drupal\user\Entity\Role.

Other projects


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