I can load paragraphes of a nodes field using
$paragraphs = $node->get('my_field')->referencedEntities()
In hook_node_update I could load the previous paragraphes using
$paragraphs = $node->original->get('my_field')->referencedEntities()
But instead I would like to load the previews paragraph from their id, somethings like:
$paragraphs = $node->get('my_field')->referencedEntities() foreach ($paragraphs as $key => $paragraph) { // getRevisionIDs is pseudo code and does not exist $revisionIds = getRevisionIDs($paragraph['entityKeys]['id']) $previewParagraph = Drupal::entityTypeManager()->getStorage('paragraph')->loadRevision($revisionIds[1]) }