Classes, traits, and interfaces - main - drupal
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 |
|---|---|---|---|---|---|---|---|---|
| UserRolesAccessPolicy | final class | Drupal\Core\Session | core/ |
Grants permissions based on a user's roles. | 1 | 2 | ||
| UserRolesAccessPolicyTest | class | Drupal\Tests\Core\Session | core/ |
Tests Drupal\Core\Session\UserRolesAccessPolicy. | ||||
| UserRolesAssignmentTest | class | Drupal\Tests\user\Functional | core/ |
Tests that users can be assigned and unassigned roles. | ||||
| UserRolesCacheContext | class | Drupal\Core\Cache\Context | core/ |
Defines the UserRolesCacheContext service, for "per role" caching. | 1 | 2 | ||
| UserRolesCacheContextTest | class | Drupal\Tests\Core\Cache\Context | core/ |
Tests Drupal\Core\Cache\Context\UserRolesCacheContext. | ||||
| UserRolesPermissionsTest | class | Drupal\KernelTests\Core\Session | core/ |
Test case for getting permissions from user roles. | ||||
| UserRoleTest | class | Drupal\Tests\user\Kernel\Views | core/ |
Tests rendering when the role is numeric. | ||||
| UserRouteAlterSubscriber | class | Drupal\serialization\EventSubscriber | core/ |
Alters user authentication routes to support added serialization formats. | 2 | |||
| UserRouteAlterTest | class | Drupal\Tests\serialization\Kernel | core/ |
Tests that the user routes can be altered. | ||||
| UserRouteProvider | class | Drupal\user\Entity | core/ |
Provides routes for the user entity. | ||||
| UserRow | class | Drupal\user\Plugin\views\row | core/ |
A row plugin which renders a user. | ||||
| Users | class | Drupal\user\Plugin\views\wizard | core/ |
Tests creating user views with the wizard. | ||||
| UserSaveStatusTest | class | Drupal\Tests\user\Kernel | core/ |
Tests user saving status. | ||||
| UserSaveTest | class | Drupal\Tests\user\Kernel | core/ |
Tests account saving for arbitrary new uid. | ||||
| UserSearch | class | Drupal\user\Plugin\Search | core/ |
Executes a keyword search for users against the {users} database table. | ||||
| UserSearchTest | class | Drupal\Tests\search\Functional\user | core/ |
Verifies that sensitive information is hidden from unauthorized users. | ||||
| UserSelection | class | Drupal\user\Plugin\EntityReferenceSelection | core/ |
Provides specific access control for the user entity type. | ||||
| UserSession | class | Drupal\Core\Session | core/ |
An implementation of the user account interface for the global user. | 1 | 12 | ||
| UserSessionRepository | class | Drupal\Core\Session | core/ |
Provides the default user session repository. | 2 | |||
| UserSessionRepositoryInterface | interface | Drupal\Core\Session | core/ |
Provides an interface for the user session repository. | 1 | 2 | ||
| UserSessionTest | class | Drupal\Tests\Core\Session | core/ |
Tests Drupal\Core\Session\UserSession. | ||||
| UserStorage | class | Drupal\user | core/ |
Controller class for users. | 1 | |||
| UserStorageInterface | interface | Drupal\user | core/ |
Defines an interface for user entity storage classes. | 1 | 9 | ||
| UserStorageSchema | class | Drupal\user | core/ |
Defines the user schema handler. | 1 | |||
| UserSubAdminTest | class | Drupal\Tests\user\Functional | core/ |
Test 'sub-admin' account with permission to edit some users but without 'administer users' permission. | ||||
| UserTest | class | Drupal\Tests\user\Unit\Plugin\Core\Entity | core/ |
Tests Drupal\user\Entity\User. | ||||
| UserTest | class | Drupal\Tests\user\Kernel\Plugin\migrate\source\d6 | core/ |
Tests the d6_user source plugin. | ||||
| UserTest | class | Drupal\Tests\user\Kernel\Plugin\migrate\source\d7 | core/ |
Tests the d7_user source plugin. | ||||
| UserTest | class | Drupal\Tests\jsonapi\Functional | core/ |
JSON:API integration test for the "User" content entity type. | ||||
| UserTestBase | abstract class | Drupal\Tests\user\Functional\Views | core/ |
Base test class for user-related Views tests. | 7 | |||
| UserThemeHooks | class | Drupal\user\Hook | core/ |
Hook implementations for user. | 1 | |||
| UserTimeZoneTest | class | Drupal\Tests\user\Functional | core/ |
Set a user time zone and verify that dates are displayed in local time. | ||||
| UserTokenReplaceTest | class | Drupal\Tests\user\Functional | core/ |
Tests the replacement of user tokens. | ||||
| UserTokensHooks | class | Drupal\user\Hook | core/ |
Hook implementations for user. | ||||
| UserTranslationUITest | class | Drupal\Tests\user\Functional | core/ |
Tests the User Translation UI. | ||||
| UserUid | class | Drupal\comment\Plugin\views\filter | core/ |
Filter handler, accepts user ID to check for nodes user posted/commented on. | ||||
| UserUid | class | Drupal\comment\Plugin\views\argument | core/ |
The views user ID argument handler. | ||||
| UserUpdate7002 | in drupal:11.3.0 and is removed from drupal:12.0.0. There is no replacement. |
class | Drupal\user\Plugin\migrate\process\d6 | core/ |
Converts user time zones from time zone offsets to time zone names. | |||
| UserUpdate8002 | in drupal:11.3.0 and is removed from drupal:12.0.0. There is no replacement. |
class | Drupal\user\Plugin\migrate\process | core/ |
Keep the predefined roles for rid 1 and 2. | |||
| UserValidationTest | class | Drupal\Tests\user\Kernel | core/ |
Verify that user validity checks behave as designed. | ||||
| UserViewsData | class | Drupal\user | core/ |
Provides the views data for the user entity type. | 1 | |||
| UserViewsDataTest | class | Drupal\Tests\user\Kernel\Views | core/ |
Contains tests related to the views data for the user entity type. | ||||
| UserViewsExecutionHooks | class | Drupal\user\Hook | core/ |
Hook implementations for user. | ||||
| UserViewsFieldAccessTest | class | Drupal\Tests\user\Kernel\Views | core/ |
Tests base field access in Views for the user entity. | ||||
| UserViewsHooks | class | Drupal\user\Hook | core/ |
Hook implementations for user. | ||||
| UserXmlAnonTest | class | Drupal\Tests\user\Functional\Rest | core/ |
Tests User Xml Anon. | ||||
| UserXmlBasicAuthTest | class | Drupal\Tests\user\Functional\Rest | core/ |
Tests User Xml Basic Auth. | ||||
| UserXmlCookieTest | class | Drupal\Tests\user\Functional\Rest | core/ |
Tests User Xml Cookie. | ||||
| UsingNonInstalledTraitClass | class | Drupal\plugin_test\Plugin\plugin_test\custom_annotation | core/ |
This class does not have a plugin attribute or plugin annotation on purpose. | ||||
| Uuid | class | Drupal\Component\Uuid | core/ |
UUID Helper methods. | 9 |
Pagination
- Previous page
- Page 212
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.