function WorkspaceAssociation::getAssociatedInitialRevisions

Retrieves all content revisions that were created in a given workspace.

Parameters

string $workspace_id: The ID of the workspace.

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

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

Return value

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

Overrides WorkspaceAssociationInterface::getAssociatedInitialRevisions

File

core/modules/workspaces/src/WorkspaceAssociation.php, line 62

Class

WorkspaceAssociation
Provides a class for CRUD operations on workspace associations.

Namespace

Drupal\workspaces

Code

public function getAssociatedInitialRevisions(string $workspace_id, string $entity_type_id, array $entity_ids = []) {
  return $this->workspaceTracker
    ->getTrackedInitialRevisions($workspace_id, $entity_type_id, $entity_ids);
}

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