Email us at info@henrytech.org to discuss your Drupal Migration today!
Create a paragraph
use Drupal\node\Entity\Node;
use Drupal\paragraphs\Entity\Paragraph;
$paragraph_1 = Paragraph::create([
'type' => 'paragraph_type_1', //machine name of paragraph
'field_text' => [
'value' => 'Some text',
'format' => 'full_html',
],
]);
$paragraph_1->save();
Create a nested paragraph
