Ran Qiangjun

Blog/Bloglet about Drupal, Ops, and mORe

Drupal Entity Reference(ER), Entity Query and More

Submitted by jungle on Mon, 12/09/2019 - 16:01

Entity Query

Remember to disable access check at the most of cases

$query->accessCheck(FALSE);

Ger target IDs in one go.

$target_ids = array_column($payment->AN_ER_FIELD_NAME->getValue(), 'target_id');

TBC

©2020 ranqiangjun.com. All rights reserved.