I am engaged on migrating content material from fieldable panels panes in D7 to Structure Builder in D8. Thus far, I’ve managed to extract the content material I want from my D7 database, however I have been unable so as to add that content material to structure builder part parts. Backing up a bit, I am at present making an attempt to only add some inline blocks with pattern content material to a structure builder part in an try to find out methods to populate the fields, as follows:
/*
Add an inline block of 'fundamental' kind to a piece
'fundamental' blocks solely have a subject known as "physique" of kind "Textual content (formatted, lengthy, with abstract)"
*/
$part = new Part('two_column');
$testcomponent = new SectionComponent($this->uuid->generate(), 'first', [
'id' => 'inline_block:basic',
'label' => 'Test component label',
'label_display' => 'visible',
'body',[
'value'=>'Test',
'format'=>'limited_html_text',
]
]);
$section->appendComponent($testcomponent);
After I run my migration, I find yourself with a node with a inline block of “fundamental” kind within the “first” area, as anticipated, nevertheless it’s empty apart from the label. May somebody advise me on methods to set subject values for part parts?