I'd like to create a product list in drupal and send it in a webservice. For this I created an entity type with paragraphs for each product. How can I load the paragraph and access its fields? Until now I see only the target_id and target_revision_id of the product. Thanks!
$nodestorage = \Drupal::entityManager()->getStorage('node');
$productslist = $nodestorage->loadUnchanged(9)->toArray();
foreach($productslist['field_products'] as $prod) {
debug($prod);
}
Result:
Array
(
[target_id] => 1
[target_revision_id] => 3
)