Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $entity = entity_create('paragraphs_item',
- array(
- 'field_name' => 'field_page_body',
- 'bundle' => 'text'
- )
- );
- $entity->field_page_body[LANGUAGE_NONE][0] = array(
- 'value' => 'testing',
- 'format' => 'plain_text'
- );
- $entity->setHostEntity('node', $node);
- $entity->save(TRUE);
- field_attach_update('node', $node);
Add Comment
Please, Sign In to add comment