You are here

public function WorkspaceAssociationInterface::getAssociatedRevisions in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/workspaces/src/WorkspaceAssociationInterface.php \Drupal\workspaces\WorkspaceAssociationInterface::getAssociatedRevisions()

Retrieves all content revisions tracked by a given workspace.

Since the 'workspace_association' index table only tracks the latest associated revisions, this method retrieves all the tracked revisions by querying the entity type's revision table directly.

Parameters

string $workspace_id: The ID of the workspace.

string $entity_type_id: An entity type ID to find revisions for.

int[]|string[]|null $entity_ids: (optional) An array of entity IDs to filter the results by. Defaults to NULL.

Return value

array Returns an array where the values are an array of entity IDs keyed by revision IDs.

1 method overrides WorkspaceAssociationInterface::getAssociatedRevisions()
WorkspaceAssociation::getAssociatedRevisions in core/modules/workspaces/src/WorkspaceAssociation.php
Retrieves all content revisions tracked by a given workspace.

File

core/modules/workspaces/src/WorkspaceAssociationInterface.php, line 75

Class

WorkspaceAssociationInterface
Defines an interface for the workspace_association service.

Namespace

Drupal\workspaces

Code

public function getAssociatedRevisions($workspace_id, $entity_type_id, $entity_ids = NULL);