Guest User

Untitled

a guest
Oct 19th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. $entity = entity_create('paragraphs_item',
  2. array(
  3. 'field_name' => 'field_page_body',
  4. 'bundle' => 'text'
  5. )
  6. );
  7.  
  8. $entity->field_page_body[LANGUAGE_NONE][0] = array(
  9. 'value' => 'testing',
  10. 'format' => 'plain_text'
  11. );
  12.  
  13. $entity->setHostEntity('node', $node);
  14. $entity->save(TRUE);
  15.  
  16. field_attach_update('node', $node);
Add Comment
Please, Sign In to add comment