You are here

interface WorkspaceManagerInterface in Workspace 8.2

Provides an interface for managing Workspaces.

Hierarchy

Expanded class hierarchy of WorkspaceManagerInterface

All classes that implement WorkspaceManagerInterface

6 files declare their use of WorkspaceManagerInterface
EntityWorkspaceConflictConstraintValidator.php in src/Plugin/Validation/Constraint/EntityWorkspaceConflictConstraintValidator.php
PgsqlQueryFactory.php in src/EntityQuery/PgsqlQueryFactory.php
QueryFactory.php in src/EntityQuery/QueryFactory.php
QueryTrait.php in src/EntityQuery/QueryTrait.php
WorkspaceActivateForm.php in src/Form/WorkspaceActivateForm.php

... See full list

File

src/WorkspaceManagerInterface.php, line 10

Namespace

Drupal\workspace
View source
interface WorkspaceManagerInterface {

  /**
   * Returns whether an entity type can belong to a workspace or not.
   *
   * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
   *   The entity type to check.
   *
   * @return bool
   *   TRUE if the entity type can belong to a workspace, FALSE otherwise.
   */
  public function isEntityTypeSupported(EntityTypeInterface $entity_type);

  /**
   * Returns an array of entity types that can belong to workspaces.
   *
   * @return \Drupal\Core\Entity\EntityTypeInterface[]
   *   The entity types what can belong to workspaces.
   */
  public function getSupportedEntityTypes();

  /**
   * Gets the active workspace.
   *
   * @return \Drupal\workspace\WorkspaceInterface
   *   The active workspace entity object.
   */
  public function getActiveWorkspace();

  /**
   * Sets the active workspace via the workspace negotiators.
   *
   * @param \Drupal\workspace\WorkspaceInterface $workspace
   *   The workspace to set as active.
   *
   * @return $this
   *
   * @throws \Drupal\workspace\WorkspaceAccessException
   *   Thrown when the current user doesn't have access to view the workspace.
   */
  public function setActiveWorkspace(WorkspaceInterface $workspace);

  /**
   * Determines whether runtime entity operations should be altered.
   *
   * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
   *   The entity type to check.
   *
   * @return bool
   *   TRUE if the entity operations or queries should be altered in the current
   *   request, FALSE otherwise.
   */
  public function shouldAlterOperations(EntityTypeInterface $entity_type);

}

Members

Namesort descending Modifiers Type Description Overrides
WorkspaceManagerInterface::getActiveWorkspace public function Gets the active workspace. 1
WorkspaceManagerInterface::getSupportedEntityTypes public function Returns an array of entity types that can belong to workspaces. 1
WorkspaceManagerInterface::isEntityTypeSupported public function Returns whether an entity type can belong to a workspace or not. 1
WorkspaceManagerInterface::setActiveWorkspace public function Sets the active workspace via the workspace negotiators. 1
WorkspaceManagerInterface::shouldAlterOperations public function Determines whether runtime entity operations should be altered. 1