I have a Template node that holds an Entity Reference multivalue field to a series of other nodes, all referenced nodes of the same type. The referenced nodes have a text field whose value I need to get.
In template node I have a computed field that do some calculations using the values from referenced nodes.
Now I have:
$tpl = field_get_items($entity_type, $entity, 'field_plan_tpl');
$values = array();
foreach ($tpl as $field_item) {
$values[] = node_load($field_item['target_id'])->field_some_field[LANGUAGE_NONE][0]['value'];
}
How can I load the referenced entities in order to get field values, using entity_metadata_wrapper()
?