if ($this->logger === NULL
) { @
trigger_error('Calling ' . __METHOD__ . '() without the $logger argument is deprecated in drupal:10.1.0 and it will be required in drupal:11.0.0. See https://www.drupal.org/node/2932520', E_USER_DEPRECATED
);
$this->logger = \Drupal::
service('logger.channel.workspaces'
);
} } /**
* {@inheritdoc}
*/
public function trackEntity(RevisionableInterface
$entity, WorkspaceInterface
$workspace) { // Determine all workspaces that might be affected by this change.
$affected_workspaces =
$this->workspaceRepository->
getDescendantsAndSelf($workspace->
id());
// Get the currently tracked revision for this workspace.
$tracked =
$this->
getTrackedEntities($workspace->
id(),
$entity->
getEntityTypeId(),
[$entity->
id()]);
$tracked_revision_id = NULL;
if (isset($tracked[$entity->
getEntityTypeId()])) { $tracked_revision_id =
key($tracked[$entity->
getEntityTypeId()]);
} try { $transaction =
$this->database->
startTransaction();