protected function ReplicateContent::getPointerToWorkspace in Workspace 8
Returns a pointer to the specified workspace.
In most cases this pointer will be unique, but that is not guaranteed by the schema. If there are multiple pointers, which one is returned is undefined.
Parameters
\Drupal\multiversion\Entity\WorkspaceInterface $workspace: The workspace for which we want a pointer.
Return value
\Drupal\workspace\WorkspacePointerInterface The pointer to the provided workspace.
1 call to ReplicateContent::getPointerToWorkspace()
- ReplicateContent::doExecute in src/
Plugin/ RulesAction/ ReplicateContent.php - Replicate content from active Workspace to it's upstream.
File
- src/
Plugin/ RulesAction/ ReplicateContent.php, line 124
Class
- ReplicateContent
- Provides a 'Save entity' action.
Namespace
Drupal\workspace\Plugin\RulesActionCode
protected function getPointerToWorkspace(WorkspaceInterface $workspace) {
$pointers = $this->entityTypeManager
->getStorage('workspace_pointer')
->loadByProperties([
'workspace_pointer' => $workspace
->id(),
]);
$pointer = reset($pointers);
return $pointer;
}