Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

drupal 8 get field entities

// Get first field reference entity.
$entity->get('field_entity_reference')->entity;

// Get all field reference entities.
$entities = $entity->get('field_entity_reference')->referencedEntities();
Source by drupal.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #drupal #field #entities
ADD COMMENT
Topic
Name
2+7 =