interface WorkspaceOperationInterface

Same name in other branches
  1. 9 core/modules/workspaces/src/WorkspaceOperationInterface.php \Drupal\workspaces\WorkspaceOperationInterface
  2. 8.9.x core/modules/workspaces/src/WorkspaceOperationInterface.php \Drupal\workspaces\WorkspaceOperationInterface
  3. 10 core/modules/workspaces/src/WorkspaceOperationInterface.php \Drupal\workspaces\WorkspaceOperationInterface

Defines an interface for workspace operations.

Example operations are publishing, merging and syncing with a remote workspace.

@internal

Hierarchy

Expanded class hierarchy of WorkspaceOperationInterface

All classes that implement WorkspaceOperationInterface

File

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

Namespace

Drupal\workspaces
View source
interface WorkspaceOperationInterface {
    
    /**
     * Returns the human-readable label of the source.
     *
     * @return string
     *   The source label.
     */
    public function getSourceLabel();
    
    /**
     * Returns the human-readable label of the target.
     *
     * @return string
     *   The target label.
     */
    public function getTargetLabel();
    
    /**
     * Checks if there are any conflicts between the source and the target.
     *
     * @return array
     *   Returns an array consisting of the number of conflicts between the source
     *   and the target, keyed by the conflict type constant.
     */
    public function checkConflictsOnTarget();
    
    /**
     * Gets the revision identifiers for items which have changed on the target.
     *
     * @return array
     *   A multidimensional array of revision identifiers, keyed by entity type
     *   IDs.
     */
    public function getDifferringRevisionIdsOnTarget();
    
    /**
     * Gets the revision identifiers for items which have changed on the source.
     *
     * @return array
     *   A multidimensional array of revision identifiers, keyed by entity type
     *   IDs.
     */
    public function getDifferringRevisionIdsOnSource();
    
    /**
     * Gets the total number of items which have changed on the target.
     *
     * This returns the aggregated changes count across all entity types.
     * For example, if two nodes and one taxonomy term have changed on the target,
     * the return value is 3.
     *
     * @return int
     *   The number of differing revisions.
     */
    public function getNumberOfChangesOnTarget();
    
    /**
     * Gets the total number of items which have changed on the source.
     *
     * This returns the aggregated changes count across all entity types.
     * For example, if two nodes and one taxonomy term have changed on the source,
     * the return value is 3.
     *
     * @return int
     *   The number of differing revisions.
     */
    public function getNumberOfChangesOnSource();

}

Members

Title Sort descending Modifiers Object type Summary Overrides
WorkspaceOperationInterface::checkConflictsOnTarget public function Checks if there are any conflicts between the source and the target. 2
WorkspaceOperationInterface::getDifferringRevisionIdsOnSource public function Gets the revision identifiers for items which have changed on the source. 2
WorkspaceOperationInterface::getDifferringRevisionIdsOnTarget public function Gets the revision identifiers for items which have changed on the target. 2
WorkspaceOperationInterface::getNumberOfChangesOnSource public function Gets the total number of items which have changed on the source. 2
WorkspaceOperationInterface::getNumberOfChangesOnTarget public function Gets the total number of items which have changed on the target. 2
WorkspaceOperationInterface::getSourceLabel public function Returns the human-readable label of the source. 2
WorkspaceOperationInterface::getTargetLabel public function Returns the human-readable label of the target. 2

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