'context_mapping' =>
['entity' => 'layout_builder.entity'
],
];
if ($is_view_configurable_non_extra_field) { $configuration['id'
] = 'field_block:' .
$this->
getTargetEntityTypeId() . ':' .
$this->
getTargetBundle() . ':' .
$name;
$keys =
array_flip(['type', 'label', 'settings', 'third_party_settings'
]);
$configuration['formatter'
] =
array_intersect_key($options,
$keys);
} else { $configuration['id'
] = 'extra_field_block:' .
$this->
getTargetEntityTypeId() . ':' .
$this->
getTargetBundle() . ':' .
$name;
} $section =
$this->
getDefaultSection();
$region =
$options['region'
] ??
$section->
getDefaultRegion();
$new_component =
(new SectionComponent(\Drupal::
service('uuid'
)->
generate(),
$region,
$configuration));
$section->
appendComponent($new_component);
} return $this;
} /**
* Gets a default section.
*
* @return \Drupal\layout_builder\Section
* The default section.
*/