Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / workspaces / src / WorkspaceOperationInterface.php
1 <?php
2
3 namespace Drupal\workspaces;
4
5 /**
6  * Defines an interface for workspace operations.
7  *
8  * Example operations are publishing, merging and syncing with a remote
9  * workspace.
10  *
11  * @internal
12  */
13 interface WorkspaceOperationInterface {
14
15   /**
16    * Returns the human-readable label of the source.
17    *
18    * @return string
19    *   The source label.
20    */
21   public function getSourceLabel();
22
23   /**
24    * Returns the human-readable label of the target.
25    *
26    * @return string
27    *   The target label.
28    */
29   public function getTargetLabel();
30
31   /**
32    * Checks if there are any conflicts between the source and the target.
33    *
34    * @return array
35    *   Returns an array consisting of the number of conflicts between the source
36    *   and the target, keyed by the conflict type constant.
37    */
38   public function checkConflictsOnTarget();
39
40   /**
41    * Gets the revision identifiers for items which have changed on the target.
42    *
43    * @return array
44    *   A multidimensional array of revision identifiers, keyed by entity type
45    *   IDs.
46    */
47   public function getDifferringRevisionIdsOnTarget();
48
49   /**
50    * Gets the revision identifiers for items which have changed on the source.
51    *
52    * @return array
53    *   A multidimensional array of revision identifiers, keyed by entity type
54    *   IDs.
55    */
56   public function getDifferringRevisionIdsOnSource();
57
58   /**
59    * Gets the total number of items which have changed on the target.
60    *
61    * This returns the aggregated changes count across all entity types.
62    * For example, if two nodes and one taxonomy term have changed on the target,
63    * the return value is 3.
64    *
65    * @return int
66    *   The number of differing revisions.
67    */
68   public function getNumberOfChangesOnTarget();
69
70   /**
71    * Gets the total number of items which have changed on the source.
72    *
73    * This returns the aggregated changes count across all entity types.
74    * For example, if two nodes and one taxonomy term have changed on the source,
75    * the return value is 3.
76    *
77    * @return int
78    *   The number of differing revisions.
79    */
80   public function getNumberOfChangesOnSource();
81
82 }