I've created a custom block type.
I want to create a block with 19 translations programmatically. I've seen that you can use Block::create() method...for which I can neither find proper documentation nor examples. Could anyone provide an example?
Fyi my code is:
Block::create([
'id' => 'my_header_dk',
'settings' => [
'id' => 'my_header',
'label' => 'My header',
'label_display' => FALSE,
'provider' => 'my_block',
'status' => TRUE,
'langcode' = 'da',
'icon' => [
33,
],
'header' => 'This is the header text',
'link_text' => 'Click here',
'visibility' => [],
'region' => 'header',
'plugin' => 'my_header',
'theme' => 'my_theme',
'status' => TRUE,
])->save();