interface WorkspaceInterface

Same name and namespace in other branches
  1. 11.x core/modules/workspaces/src/WorkspaceInterface.php \Drupal\workspaces\WorkspaceInterface
  2. 10 core/modules/workspaces/src/WorkspaceInterface.php \Drupal\workspaces\WorkspaceInterface
  3. 9 core/modules/workspaces/src/WorkspaceInterface.php \Drupal\workspaces\WorkspaceInterface
  4. 8.9.x core/modules/workspaces/src/WorkspaceInterface.php \Drupal\workspaces\WorkspaceInterface

Defines an interface for the workspace entity type.

Hierarchy

Expanded class hierarchy of WorkspaceInterface

All classes that implement WorkspaceInterface

13 files declare their use of WorkspaceInterface
QueryParameterWorkspaceNegotiator.php in core/modules/workspaces/src/Negotiator/QueryParameterWorkspaceNegotiator.php
SessionWorkspaceNegotiator.php in core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php
TestWorkspaceNegotiator.php in core/modules/workspaces/tests/modules/workspace_update_test/src/Negotiator/TestWorkspaceNegotiator.php
Workspace.php in core/modules/workspaces/src/Entity/Workspace.php
WorkspaceMergeForm.php in core/modules/workspaces_ui/src/Form/WorkspaceMergeForm.php

... See full list

File

core/modules/workspaces/src/WorkspaceInterface.php, line 13

Namespace

Drupal\workspaces
View source
interface WorkspaceInterface extends ContentEntityInterface, EntityChangedInterface, EntityOwnerInterface {
  
  /**
   * Publishes the contents of this workspace to the default (Live) workspace.
   */
  public function publish();
  
  /**
   * Gets the workspace creation timestamp.
   *
   * @return int
   *   Creation timestamp of the workspace.
   */
  public function getCreatedTime();
  
  /**
   * Sets the workspace creation timestamp.
   *
   * @param int $timestamp
   *   The workspace creation timestamp.
   *
   * @return $this
   */
  public function setCreatedTime($timestamp);
  
  /**
   * Determines whether the workspace has a parent.
   *
   * @return bool
   *   TRUE if the workspace has a parent, FALSE otherwise.
   */
  public function hasParent();
  
  /**
   * Gets the provider of this workspace.
   *
   * @return \Drupal\workspaces\Provider\WorkspaceProviderInterface
   *   The workspace provider.
   */
  public function getProvider() : WorkspaceProviderInterface;

}

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