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
WorkflowTypeManager class Drupal\workflows core/modules/workflows/src/WorkflowTypeManager.php Provides a Workflow type plugin manager. 2 2
WorkflowTypeStateFormBase abstract class Drupal\workflows\Plugin core/modules/workflows/src/Plugin/WorkflowTypeStateFormBase.php A base class for workflow type state forms. 2 2
WorkflowTypeTestHooks class Drupal\workflow_type_test\Hook core/modules/workflows/tests/modules/workflow_type_test/src/Hook/WorkflowTypeTestHooks.php Hook implementations for workflow_type_test.
WorkflowTypeTransitionFormBase abstract class Drupal\workflows\Plugin core/modules/workflows/src/Plugin/WorkflowTypeTransitionFormBase.php A base class for workflow type transition forms. 1 1
WorkflowUiNoTypeTest class Drupal\Tests\workflows\Functional core/modules/workflows/tests/src/Functional/WorkflowUiNoTypeTest.php Tests workflow UI when there are no types.
WorkflowUiTest class Drupal\Tests\workflows\Functional core/modules/workflows/tests/src/Functional/WorkflowUiTest.php Tests workflow creation UI.
WorkflowValidationTest class Drupal\Tests\workflows\Kernel core/modules/workflows/tests/src/Kernel/WorkflowValidationTest.php Tests validation of workflow entities.
WorkflowXmlAnonTest class Drupal\Tests\workflows\Functional\Rest core/modules/workflows/tests/src/Functional/Rest/WorkflowXmlAnonTest.php Tests Workflow Xml Anon.
WorkflowXmlBasicAuthTest class Drupal\Tests\workflows\Functional\Rest core/modules/workflows/tests/src/Functional/Rest/WorkflowXmlBasicAuthTest.php Tests Workflow Xml Basic Auth.
WorkflowXmlCookieTest class Drupal\Tests\workflows\Functional\Rest core/modules/workflows/tests/src/Functional/Rest/WorkflowXmlCookieTest.php Tests Workflow Xml Cookie.
Workspace class Drupal\workspaces\Entity core/modules/workspaces/src/Entity/Workspace.php The workspace entity class. 31
WorkspaceAccessControlHandler class Drupal\workspaces core/modules/workspaces/src/WorkspaceAccessControlHandler.php Defines the access control handler for the workspace entity type. 1
WorkspaceAccessException class Drupal\workspaces core/modules/workspaces/src/WorkspaceAccessException.php Exception thrown when trying to switch to an inaccessible workspace. 1 3
WorkspaceAccessTest class Drupal\Tests\workspaces\Kernel core/modules/workspaces/tests/src/Kernel/WorkspaceAccessTest.php Tests access on workspaces.
WorkspaceAccessTestHooks class Drupal\workspace_access_test\Hook core/modules/workspaces/tests/modules/workspace_access_test/src/Hook/WorkspaceAccessTestHooks.php Hook implementations for workspace_access_test.
WorkspaceActivateForm class Drupal\workspaces_ui\Form core/modules/workspaces_ui/src/Form/WorkspaceActivateForm.php Handle activation of a workspace on administrative pages. 1
WorkspaceAssociationRevisionTableUpdateTest class Drupal\Tests\workspaces\Functional\Update core/modules/workspaces/tests/src/Functional/Update/WorkspaceAssociationRevisionTableUpdateTest.php Tests the upgrade path for the workspace_association_revision table.
WorkspaceAssociationStringIdsUpdatePathTest class Drupal\Tests\workspaces\Functional\Update core/modules/workspaces/tests/src/Functional/Update/WorkspaceAssociationStringIdsUpdatePathTest.php Tests the update path for string IDs in workspace_association.
WorkspaceBypassTest class Drupal\Tests\workspaces\Functional core/modules/workspaces/tests/src/Functional/WorkspaceBypassTest.php Tests access bypass permission controls on workspaces.
WorkspaceCacheContext class Drupal\workspaces core/modules/workspaces/src/WorkspaceCacheContext.php Defines the WorkspaceCacheContext service, for "per workspace" caching. 1 2
WorkspaceCacheContextTest class Drupal\Tests\workspaces\Functional core/modules/workspaces/tests/src/Functional/WorkspaceCacheContextTest.php Tests the workspace cache context.
WorkspaceConcurrentEditingTest class Drupal\Tests\workspaces\Functional core/modules/workspaces/tests/src/Functional/WorkspaceConcurrentEditingTest.php Tests concurrent edits in different workspaces.
WorkspaceConflictException class Drupal\workspaces core/modules/workspaces/src/WorkspaceConflictException.php An exception thrown when two workspaces are in a conflicting content state.
WorkspaceContentModerationIntegrationTest class Drupal\Tests\content_moderation\Functional core/modules/content_moderation/tests/src/Functional/WorkspaceContentModerationIntegrationTest.php Tests Workspaces together with Content Moderation.
WorkspaceContentTranslationTest class Drupal\Tests\workspaces\Kernel core/modules/workspaces/tests/src/Kernel/WorkspaceContentTranslationTest.php Tests entity translations with workspaces.
WorkspaceCRUDTest class Drupal\Tests\workspaces\Kernel core/modules/workspaces/tests/src/Kernel/WorkspaceCRUDTest.php Tests CRUD operations for workspaces.
WorkspaceDeleteForm class Drupal\workspaces_ui\Form core/modules/workspaces_ui/src/Form/WorkspaceDeleteForm.php Provides a form for deleting a workspace. 1
WorkspaceDynamicSafeFormInterface interface Drupal\Core\Form core/lib/Drupal/Core/Form/WorkspaceDynamicSafeFormInterface.php Defines an interface for forms that can be workspace-safe. 10 12
WorkspaceEntityDeleteTest class Drupal\Tests\workspaces\Kernel core/modules/workspaces/tests/src/Kernel/WorkspaceEntityDeleteTest.php Tests entity deletions with workspaces.
WorkspaceEntityDeleteTest class Drupal\Tests\workspaces\Functional core/modules/workspaces/tests/src/Functional/WorkspaceEntityDeleteTest.php Tests entity deletions with workspaces.
WorkspaceEntityOperationsTest class Drupal\Tests\workspaces\Kernel core/modules/workspaces/tests/src/Kernel/WorkspaceEntityOperationsTest.php Tests entity operations with workspaces.
WorkspaceEntityRepositoryTest class Drupal\Tests\workspaces\Kernel core/modules/workspaces/tests/src/Kernel/WorkspaceEntityRepositoryTest.php Tests the entity repository integration for workspaces.
WorkspaceForm class Drupal\workspaces_ui\Form core/modules/workspaces_ui/src/Form/WorkspaceForm.php Form controller for the workspace edit forms. 1
WorkspaceFormPersistenceTest class Drupal\Tests\workspaces\Kernel core/modules/workspaces/tests/src/Kernel/WorkspaceFormPersistenceTest.php Tests form persistence for the active workspace.
WorkspaceFormValidationTest class Drupal\Tests\workspaces\Functional core/modules/workspaces/tests/src/Functional/WorkspaceFormValidationTest.php Tests Workspaces form validation.
WorkspaceHandlerInterface interface Drupal\workspaces\Entity\Handler core/modules/workspaces/src/Entity/Handler/WorkspaceHandlerInterface.php Defines workspace operations that need to vary by entity type. 2
WorkspaceIdNegotiatorInterface interface Drupal\workspaces\Negotiator core/modules/workspaces/src/Negotiator/WorkspaceIdNegotiatorInterface.php Interface for workspace negotiators that return only the negotiated ID. 2 1
WorkspaceInformation class Drupal\workspaces core/modules/workspaces/src/WorkspaceInformation.php General service for workspace support information. 1 2
WorkspaceInformationInterface interface Drupal\workspaces core/modules/workspaces/src/WorkspaceInformationInterface.php Provides an interface for workspace-support information. 1 14
WorkspaceInformationTest class Drupal\Tests\workspaces\Kernel core/modules/workspaces/tests/src/Kernel/WorkspaceInformationTest.php Tests the workspace information service.
WorkspaceIntegrationTest class Drupal\Tests\workspaces\Kernel core/modules/workspaces/tests/src/Kernel/WorkspaceIntegrationTest.php Tests a complete publishing scenario across different workspaces.
WorkspaceInterface interface Drupal\workspaces core/modules/workspaces/src/WorkspaceInterface.php Defines an interface for the workspace entity type. 1 13
WorkspaceJsonAnonTest class Drupal\Tests\workspaces\Functional\Rest core/modules/workspaces/tests/src/Functional/Rest/WorkspaceJsonAnonTest.php Test workspace entities for unauthenticated JSON requests.
WorkspaceJsonBasicAuthTest class Drupal\Tests\workspaces\Functional\Rest core/modules/workspaces/tests/src/Functional/Rest/WorkspaceJsonBasicAuthTest.php Test workspace entities for JSON requests via basic auth.
WorkspaceJsonCookieTest class Drupal\Tests\workspaces\Functional\Rest core/modules/workspaces/tests/src/Functional/Rest/WorkspaceJsonCookieTest.php Test workspace entities for JSON requests with cookie authentication.
WorkspaceListBuilder class Drupal\workspaces_ui core/modules/workspaces_ui/src/WorkspaceListBuilder.php Defines a class to build a listing of workspace entities. 1
WorkspaceManager class Drupal\workspaces core/modules/workspaces/src/WorkspaceManager.php Provides the workspace manager. 2
WorkspaceManagerInterface interface Drupal\workspaces core/modules/workspaces/src/WorkspaceManagerInterface.php Provides an interface for managing Workspaces. 1 24
WorkspaceMenuLinkContentIntegrationTest class Drupal\Tests\workspaces\Functional core/modules/workspaces/tests/src/Functional/WorkspaceMenuLinkContentIntegrationTest.php Tests workspace integration for custom menu links.
WorkspaceMergeForm class Drupal\workspaces_ui\Form core/modules/workspaces_ui/src/Form/WorkspaceMergeForm.php Provides a form that merges the contents for a workspace into another one. 1

Other projects


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