3 namespace Drupal\workspaces;
5 use Drupal\Core\Entity\ContentEntityInterface;
6 use Drupal\Core\Entity\EntityChangedInterface;
7 use Drupal\user\EntityOwnerInterface;
10 * Defines an interface for the workspace entity type.
12 interface WorkspaceInterface extends ContentEntityInterface, EntityChangedInterface, EntityOwnerInterface {
15 * The ID of the default workspace.
17 const DEFAULT_WORKSPACE = 'live';
20 * Publishes the contents of this workspace to the default (Live) workspace.
22 public function publish();
25 * Determines whether the workspace is the default one or not.
28 * TRUE if this workspace is the default one (e.g 'Live'), FALSE otherwise.
30 public function isDefaultWorkspace();
33 * Gets the workspace creation timestamp.
36 * Creation timestamp of the workspace.
38 public function getCreatedTime();
41 * Sets the workspace creation timestamp.
43 * @param int $timestamp
44 * The workspace creation timestamp.
48 public function setCreatedTime($timestamp);