Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / workspaces / src / WorkspaceAssociationStorageInterface.php
1 <?php
2
3 namespace Drupal\workspaces;
4
5 use Drupal\Core\Entity\ContentEntityStorageInterface;
6 use Drupal\Core\Entity\EntityInterface;
7
8 /**
9  * Defines an interface for workspace association entity storage classes.
10  */
11 interface WorkspaceAssociationStorageInterface extends ContentEntityStorageInterface {
12
13   /**
14    * Triggers clean-up operations after pushing.
15    *
16    * @param \Drupal\workspaces\WorkspaceInterface $workspace
17    *   A workspace entity.
18    */
19   public function postPush(WorkspaceInterface $workspace);
20
21   /**
22    * Retrieves the content revisions tracked by a given workspace.
23    *
24    * @param string $workspace_id
25    *   The ID of the workspace.
26    * @param bool $all_revisions
27    *   (optional) Whether to return all the tracked revisions for each entity or
28    *   just the latest tracked revision. Defaults to FALSE.
29    *
30    * @return array
31    *   Returns a multidimensional array where the first level keys are entity
32    *   type IDs and the values are an array of entity IDs keyed by revision IDs.
33    */
34   public function getTrackedEntities($workspace_id, $all_revisions = FALSE);
35
36   /**
37    * Gets a list of workspace IDs in which an entity is tracked.
38    *
39    * @param \Drupal\Core\Entity\EntityInterface $entity
40    *   An entity object.
41    *
42    * @return string[]
43    *   An array of workspace IDs where the given entity is tracked, or an empty
44    *   array if it is not tracked anywhere.
45    */
46   public function getEntityTrackingWorkspaceIds(EntityInterface $entity);
47
48 }