You are here

interface WorkspaceInterface in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/workspaces/src/WorkspaceInterface.php \Drupal\workspaces\WorkspaceInterface
  2. 9 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

8 files declare their use of WorkspaceInterface
content_moderation.module in core/modules/content_moderation/content_moderation.module
Contains content_moderation.module.
SessionWorkspaceNegotiator.php in core/modules/workspaces/src/Negotiator/SessionWorkspaceNegotiator.php
Workspace.php in core/modules/workspaces/src/Entity/Workspace.php
WorkspaceMergeForm.php in core/modules/workspaces/src/Form/WorkspaceMergeForm.php
WorkspaceNegotiatorInterface.php in core/modules/workspaces/src/Negotiator/WorkspaceNegotiatorInterface.php

... See full list

File

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

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();

}

Members