Classes, traits, and interfaces - 10.3.x - 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 1518
| Name | Deprecated | Object type | Namespace | File name | Summary | Direct uses | Use statements | Strings |
|---|---|---|---|---|---|---|---|---|
| WorkspacePublishForm | class | Drupal\workspaces\Form | core/ |
Provides the workspace publishing form. | 1 | 1 | ||
| WorkspacePublishFormTest | class | Drupal\Tests\workspaces\Kernel | core/ |
@coversDefaultClass \Drupal\workspaces\Form\WorkspacePublishForm[[api-linebreak]] @group workspaces | ||||
| WorkspaceQueryParameterNegotiatorTest | class | Drupal\Tests\workspaces\Kernel | core/ |
Tests the query parameter workspace negotiator. | ||||
| WorkspaceRepository | class | Drupal\workspaces | core/ |
Provides the default workspace tree lookup operations. | 2 | |||
| WorkspaceRepositoryInterface | interface | Drupal\workspaces | core/ |
Provides an interface for workspace tree lookup operations. | 1 | 1 | ||
| WorkspaceRequestSubscriber | class | Drupal\workspaces\EventSubscriber | core/ |
Provides a event subscriber for setting workspace-specific cache keys. | 1 | 2 | ||
| WorkspaceRequestSubscriberTest | class | Drupal\Tests\workspaces\Unit | core/ |
@coversDefaultClass \Drupal\workspaces\EventSubscriber\WorkspaceRequestSubscriber[[api-linebreak]] | ||||
| WorkspaceResourceTestBase | abstract class | Drupal\Tests\workspaces\Functional\Rest | core/ |
Base class for workspace EntityResource tests. | 6 | |||
| WorkspaceSafeFormInterface | interface | Drupal\Core\Form | core/ |
Defines an interface for forms that are safe to be submitted in a workspace. | 13 | 15 | ||
| WorkspaceSafeFormTrait | trait | Drupal\layout_builder\Form | core/ |
Provides a trait that marks Layout Builder forms as workspace-safe. | ||||
| WorkspaceSafeFormTrait | trait | Drupal\Core\Entity\Form | core/ |
Provides helpers for checking whether objects in forms are workspace-safe. | 2 | |||
| WorkspacesAliasManager | class | Drupal\workspaces | core/ |
Decorates the path_alias.manager service for workspace-specific caching. | ||||
| WorkspacesAliasRepository | class | Drupal\workspaces | core/ |
Provides workspace-specific path alias lookup queries. | ||||
| WorkspacesContentModerationStateTest | class | Drupal\Tests\content_moderation\Kernel | core/ |
Tests that Workspaces and Content Moderation work together properly. | ||||
| WorkspaceSelection | class | Drupal\workspaces\Plugin\EntityReferenceSelection | core/ |
Provides specific access control for the workspace entity type. | ||||
| WorkspacesFileItemTest | class | Drupal\Tests\workspaces\Kernel | core/ |
Tests using entity fields of the file field type in a workspace. | ||||
| WorkspacesHtmlEntityFormController | class | Drupal\workspaces\Controller | core/ |
Overrides the entity form controller service for workspaces operations. | 2 | |||
| WorkspacesLayoutBuilderIntegrationTest | class | Drupal\Tests\workspaces\FunctionalJavascript | core/ |
Tests for layout editing in workspaces. | ||||
| WorkspacesLazyBuilders | final class | Drupal\workspaces | core/ |
Defines a service for workspaces #lazy_builder callbacks. | 2 | |||
| WorkspacesMenuTreeStorage | class | Drupal\workspaces | core/ |
Overrides the default menu storage to provide workspace-specific menu links. | 2 | |||
| WorkspacesServiceProvider | class | Drupal\workspaces | core/ |
Defines a service provider for the Workspaces module. | ||||
| WorkspaceSubscriber | class | Drupal\content_moderation\EventSubscriber | core/ |
Checks whether a workspace is publishable, and prevents publishing if needed. | 2 | |||
| WorkspacesUninstallTest | class | Drupal\Tests\workspaces\Functional | core/ |
Tests uninstalling the Workspaces module. | ||||
| WorkspaceSwitcherBlock | class | Drupal\workspaces\Plugin\Block | core/ |
Provides a 'Workspace switcher' block. | ||||
| WorkspaceSwitcherForm | class | Drupal\workspaces\Form | core/ |
Provides a form that activates a different workspace. | 1 | |||
| WorkspaceSwitcherTest | class | Drupal\Tests\workspaces\Functional | core/ |
Tests workspace switching functionality. | ||||
| WorkspaceTest | class | Drupal\Tests\workspaces\Functional | core/ |
Test the workspace entity. | ||||
| WorkspaceTest | class | Drupal\Tests\jsonapi\Functional | core/ |
JSON:API integration test for the "Workspace" content entity type. | ||||
| WorkspaceTestTrait | trait | Drupal\Tests\workspaces\Kernel | core/ |
A trait with common workspaces testing functionality. | 1 | |||
| WorkspaceTestUtilities | trait | Drupal\Tests\workspaces\Functional | core/ |
Utility methods for use in BrowserTestBase tests. | 2 | |||
| WorkspaceToolbarIntegrationTest | class | Drupal\Tests\workspaces\FunctionalJavascript | core/ |
Tests workspace settings stray integration. | ||||
| WorkspaceViewBuilder | class | Drupal\workspaces | core/ |
Provides a Workspace view builder. | ||||
| WorkspaceViewsBulkFormTest | class | Drupal\Tests\workspaces\Functional | core/ |
Tests the views bulk form in a workspace. | ||||
| WorkspaceViewsIntegrationTest | class | Drupal\Tests\workspaces\Kernel | core/ |
Tests the views integration for workspaces. | ||||
| WorkspaceViewTest | class | Drupal\Tests\workspaces\Functional | core/ |
Tests permission controls on workspaces. | ||||
| WorkspaceXmlAnonTest | class | Drupal\Tests\workspaces\Functional\Rest | core/ |
Test workspace entities for unauthenticated XML requests. | ||||
| WorkspaceXmlBasicAuthTest | class | Drupal\Tests\workspaces\Functional\Rest | core/ |
Test workspace entities for XML requests with cookie authentication. | ||||
| WorkspaceXmlCookieTest | class | Drupal\Tests\workspaces\Functional\Rest | core/ |
Test workspace entities for XML requests. | ||||
| WriteSafeSessionHandler | class | Drupal\Core\Session | core/ |
Wraps the session handler to prevent writes when not necessary or allowed. | 1 | 2 | ||
| WriteSafeSessionHandlerInterface | interface | Drupal\Core\Session | core/ |
Provides an interface for session handlers where writing can be disabled. | 1 | |||
| WriteSafeSessionHandlerTest | class | Drupal\Tests\Core\Session | core/ |
Tests \Drupal\Core\Session\WriteSafeSessionHandler. | ||||
| XdebugRequestTrait | trait | Drupal\Tests | core/ |
1 | ||||
| XdebugRequestTraitTest | class | Drupal\Tests\Core\Test | core/ |
Provides tests for the Xdebug request trait. | ||||
| XmlEncoder | class | Drupal\serialization\Encoder | core/ |
Adds XML support for serializer. | 2 | 2 | ||
| XmlEncoderTest | class | Drupal\Tests\serialization\Unit\Encoder | core/ |
@coversDefaultClass \Drupal\serialization\Encoder\XmlEncoder[[api-linebreak]] @group serialization | ||||
| XmlEntityNormalizationQuirksTrait | trait | Drupal\Tests\rest\Functional\EntityResource | core/ |
Trait for EntityResourceTestBase subclasses testing $format='xml'. | 144 | |||
| XmlNormalizationQuirksTrait | trait | Drupal\Tests\rest\Functional | core/ |
Trait for ResourceTestBase subclasses testing $format='xml'. | 1 | |||
| Xss | class | Drupal\Component\Utility | core/ |
Provides helper to filter for cross-site scripting. | 1 | 51 | ||
| XssTest | class | Drupal\Tests\Component\Utility | core/ |
XSS Filtering tests. | ||||
| XssTest | class | Drupal\Tests\views_ui\Functional | core/ |
Tests the Xss vulnerability. |
Pagination
- Previous page
- Page 201
- Next page
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.