Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / workspaces / src / WorkspaceInterface.php
1 <?php
2
3 namespace Drupal\workspaces;
4
5 use Drupal\Core\Entity\ContentEntityInterface;
6 use Drupal\Core\Entity\EntityChangedInterface;
7 use Drupal\user\EntityOwnerInterface;
8
9 /**
10  * Defines an interface for the workspace entity type.
11  */
12 interface WorkspaceInterface extends ContentEntityInterface, EntityChangedInterface, EntityOwnerInterface {
13
14   /**
15    * The ID of the default workspace.
16    */
17   const DEFAULT_WORKSPACE = 'live';
18
19   /**
20    * Publishes the contents of this workspace to the default (Live) workspace.
21    */
22   public function publish();
23
24   /**
25    * Determines whether the workspace is the default one or not.
26    *
27    * @return bool
28    *   TRUE if this workspace is the default one (e.g 'Live'), FALSE otherwise.
29    */
30   public function isDefaultWorkspace();
31
32   /**
33    * Gets the workspace creation timestamp.
34    *
35    * @return int
36    *   Creation timestamp of the workspace.
37    */
38   public function getCreatedTime();
39
40   /**
41    * Sets the workspace creation timestamp.
42    *
43    * @param int $timestamp
44    *   The workspace creation timestamp.
45    *
46    * @return $this
47    */
48   public function setCreatedTime($timestamp);
49
50 }