daily pastebin goal
52%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $serialized_entity = json_encode([
  2.     'title' => array(
  3.       'value' => 'some_title',
  4.     ),
  5.     'type' => array(
  6.       'target_id' => 'node_type',
  7.     ),
  8.     '_links' => array(
  9.       'type' => array(
  10.         'href' => $base_url . '/rest/type/node/node_type',
  11.       ),
  12.     ),
  13.     'entity_reference_field' => array(
  14.       'target_id' => $entity_id, // This does not work. Using a valid uid.
  15.     ),
  16.     'normal_field' => array(
  17.       'value' => 'some_data',
  18.     ),
  19. ]);
  20.    
  21. 'entity_reference_field' => array(
  22.   'target_id' => $entity_id,
  23. ),
  24.    
  25. 'entity_reference_field' => array(
  26.   array('target_id' => $entity_id),
  27. ),
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top