Pull merge.
[yaffs-website] / web / core / modules / workspaces / src / WorkspaceManagerInterface.php
index 9ce720b3f148e6536a39ff1fe74c38307015114c..006a2bd86d8a1486539c07452108fb0030204f5d 100644 (file)
@@ -49,6 +49,19 @@ interface WorkspaceManagerInterface {
    */
   public function setActiveWorkspace(WorkspaceInterface $workspace);
 
+  /**
+   * Executes the given callback function in the context of a workspace.
+   *
+   * @param string $workspace_id
+   *   The ID of a workspace.
+   * @param callable $function
+   *   The callback to be executed.
+   *
+   * @return mixed
+   *   The callable's return value.
+   */
+  public function executeInWorkspace($workspace_id, callable $function);
+
   /**
    * Determines whether runtime entity operations should be altered.
    *