annotate core/modules/workspaces/src/WorkspaceInterface.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 129ea1e6d783
children
rev   line source
Chris@17 1 <?php
Chris@17 2
Chris@17 3 namespace Drupal\workspaces;
Chris@17 4
Chris@17 5 use Drupal\Core\Entity\ContentEntityInterface;
Chris@17 6 use Drupal\Core\Entity\EntityChangedInterface;
Chris@17 7 use Drupal\user\EntityOwnerInterface;
Chris@17 8
Chris@17 9 /**
Chris@17 10 * Defines an interface for the workspace entity type.
Chris@17 11 */
Chris@17 12 interface WorkspaceInterface extends ContentEntityInterface, EntityChangedInterface, EntityOwnerInterface {
Chris@17 13
Chris@17 14 /**
Chris@17 15 * The ID of the default workspace.
Chris@17 16 */
Chris@17 17 const DEFAULT_WORKSPACE = 'live';
Chris@17 18
Chris@17 19 /**
Chris@17 20 * Publishes the contents of this workspace to the default (Live) workspace.
Chris@17 21 */
Chris@17 22 public function publish();
Chris@17 23
Chris@17 24 /**
Chris@17 25 * Determines whether the workspace is the default one or not.
Chris@17 26 *
Chris@17 27 * @return bool
Chris@17 28 * TRUE if this workspace is the default one (e.g 'Live'), FALSE otherwise.
Chris@17 29 */
Chris@17 30 public function isDefaultWorkspace();
Chris@17 31
Chris@17 32 /**
Chris@17 33 * Gets the workspace creation timestamp.
Chris@17 34 *
Chris@17 35 * @return int
Chris@17 36 * Creation timestamp of the workspace.
Chris@17 37 */
Chris@17 38 public function getCreatedTime();
Chris@17 39
Chris@17 40 /**
Chris@17 41 * Sets the workspace creation timestamp.
Chris@17 42 *
Chris@17 43 * @param int $timestamp
Chris@17 44 * The workspace creation timestamp.
Chris@17 45 *
Chris@17 46 * @return $this
Chris@17 47 */
Chris@17 48 public function setCreatedTime($timestamp);
Chris@17 49
Chris@17 50 }