[D8] Obtener array de títulos de entidades referenciadas en campo entityreference

$get_authors = function()
{
$_ = [];
foreach ( \Drupal::routeMatch()->getParameter('node')->get("field_autor")->getValue() as $target ){
$_[] = Node::load( (int) $target['target_id'] )->title->value;
}
return $_;
}

drupal8

Añadir nuevo comentario

Type the characters you see in this picture. Type the characters you see in the picture; if you can't read them, refresh the CAPTCHA or submit the form and a new image will be generated. Not case sensitive.