drupal 8 get taxonomy term value in node

后端 未结 6 956
既然无缘
既然无缘 2021-02-08 05:36

Drupal\\node\\Entity\\Node Object ( [in_preview] => [values:protected] => Array ( [vid] => Array ( [x-default] =

6条回答
  •  独厮守ぢ
    2021-02-08 05:57

    You can also use some methods from EntityReferenceFieldItemList: Gets the entities referenced by this field, preserving field item deltas:

    $node->get('field_destination')->referencedEntities();
    

    Hope it will be useful for you

提交回复
热议问题