Classes, traits, and interfaces in Drupal 10
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 |
|---|---|---|---|---|---|---|---|
| WorkspaceBypassTest | class |
Drupal\ |
core/ |
Tests access bypass permission controls on workspaces. | |||
| WorkspaceCacheContext | class |
Drupal\ |
core/ |
Defines the WorkspaceCacheContext service, for "per workspace" caching. | 1 | 2 | |
| WorkspaceCacheContextTest | class |
Drupal\ |
core/ |
Tests the workspace cache context. | |||
| WorkspaceConcurrentEditingTest | class |
Drupal\ |
core/ |
Tests concurrent edits in different workspaces. | |||
| WorkspaceConflictException | class |
Drupal\ |
core/ |
An exception thrown when two workspaces are in a conflicting content state. | |||
| WorkspaceContentModerationIntegrationTest | class |
Drupal\ |
core/ |
Tests Workspaces together with Content Moderation. | |||
| WorkspaceCRUDTest | class |
Drupal\ |
core/ |
Tests CRUD operations for workspaces. | |||
| WorkspaceDeleteForm | class |
Drupal\ |
core/ |
Provides a form for deleting a workspace. | |||
| WorkspaceForm | class |
Drupal\ |
core/ |
Form controller for the workspace edit forms. | |||
| WorkspaceFormInterface | interface |
Drupal\ |
core/ |
Defines interface for workspace forms so they can be easily distinguished. | 7 | 1 | |
| WorkspaceIntegrationTest | class |
Drupal\ |
core/ |
Tests a complete publishing scenario across different workspaces. | |||
| WorkspaceInterface | interface |
Drupal\ |
core/ |
Defines an interface for the workspace entity type. | 1 | 9 | |
| WorkspaceJsonAnonTest | class |
Drupal\ |
core/ |
Test workspace entities for unauthenticated JSON requests. | |||
| WorkspaceJsonBasicAuthTest | class |
Drupal\ |
core/ |
Test workspace entities for JSON requests via basic auth. | |||
| WorkspaceJsonCookieTest | class |
Drupal\ |
core/ |
Test workspace entities for JSON requests with cookie authentication. | |||
| WorkspaceListBuilder | class |
Drupal\ |
core/ |
Defines a class to build a listing of workspace entities. | |||
| WorkspaceManager | class |
Drupal\ |
core/ |
Provides the workspace manager. | 2 | ||
| WorkspaceManagerInterface | interface |
Drupal\ |
core/ |
Provides an interface for managing Workspaces. | 1 | 13 | |
| WorkspaceMergeForm | class |
Drupal\ |
core/ |
Provides a form that merges the contents for a workspace into another one. | 1 | ||
| WorkspaceMerger | class |
Drupal\ |
core/ |
Default implementation of the workspace merger. | |||
| WorkspaceMergerInterface | interface |
Drupal\ |
core/ |
Defines an interface for the workspace merger. | 1 | ||
| WorkspaceMergerTest | class |
Drupal\ |
core/ |
Tests workspace merging. | |||
| WorkspaceNegotiatorInterface | interface |
Drupal\ |
core/ |
Workspace negotiators provide a way to get the active workspace. | 2 | 1 | |
| WorkspaceOperationFactory | class |
Drupal\ |
core/ |
Defines a factory class for workspace operations. | 2 | 2 | |
| WorkspaceOperationInterface | interface |
Drupal\ |
core/ |
Defines an interface for workspace operations. | 2 | ||
| WorkspacePermissionsTest | class |
Drupal\ |
core/ |
Tests permission controls on workspaces. | |||
| WorkspacePublisher | class |
Drupal\ |
core/ |
Default implementation of the workspace publisher. | |||
| WorkspacePublisherInterface | interface |
Drupal\ |
core/ |
Defines an interface for the workspace publisher. | 1 | ||
| WorkspacePublishForm | class |
Drupal\ |
core/ |
Provides the workspace publishing form. | 1 | ||
| WorkspaceRepository | class |
Drupal\ |
core/ |
Provides the default workspace tree lookup operations. | 2 | ||
| WorkspaceRepositoryInterface | interface |
Drupal\ |
core/ |
Provides an interface for workspace tree lookup operations. | 1 | 2 | |
| WorkspaceRequestSubscriber | class |
Drupal\ |
core/ |
Provides a event subscriber for setting workspace-specific cache keys. | 1 | 2 | |
| WorkspaceRequestSubscriberTest | class |
Drupal\ |
core/ |
@coversDefaultClass \Drupal\workspaces\EventSubscriber\WorkspaceRequestSubscriber | |||
| WorkspaceResourceTestBase | abstract class |
Drupal\ |
core/ |
Base class for workspace EntityResource tests. | 6 | ||
| WorkspacesAliasRepository | class |
Drupal\ |
core/ |
Provides workspace-specific path alias lookup queries. | |||
| WorkspacesContentModerationStateTest | class |
Drupal\ |
core/ |
Tests that Workspaces and Content Moderation work together properly. | |||
| WorkspaceSelection | class |
Drupal\ |
core/ |
Provides specific access control for the workspace entity type. | |||
| WorkspacesServiceProvider | class |
Drupal\ |
core/ |
Defines a service provider for the Workspaces module. | |||
| WorkspacesUninstallTest | class |
Drupal\ |
core/ |
Tests uninstalling the Workspaces module. | |||
| WorkspaceSwitcherBlock | class |
Drupal\ |
core/ |
Provides a 'Workspace switcher' block. | |||
| WorkspaceSwitcherForm | class |
Drupal\ |
core/ |
Provides a form that activates a different workspace. | 1 | ||
| WorkspaceSwitcherTest | class |
Drupal\ |
core/ |
Tests workspace switching functionality. | |||
| WorkspaceTest | class |
Drupal\ |
core/ |
Test the workspace entity. | |||
| WorkspaceTestTrait | trait |
Drupal\ |
core/ |
A trait with common workspaces testing functionality. | 1 | ||
| WorkspaceTestUtilities | trait |
Drupal\ |
core/ |
Utility methods for use in BrowserTestBase tests. | 1 | ||
| WorkspaceToolbarIntegrationTest | class |
Drupal\ |
core/ |
Tests workspace settings stray integration. | |||
| WorkspaceViewBuilder | class |
Drupal\ |
core/ |
Provides a Workspace view builder. | |||
| WorkspaceViewTest | class |
Drupal\ |
core/ |
Tests permission controls on workspaces. | |||
| WorkspaceXmlAnonTest | class |
Drupal\ |
core/ |
Test workspace entities for unauthenticated XML requests. | |||
| WorkspaceXmlBasicAuthTest | class |
Drupal\ |
core/ |
Test workspace entities for XML requests with cookie authentication. |