$form['#attributes'
]['data-layout-builder-target-highlight-id'
] =
$this->
blockUpdateHighlightId($uuid);
$sections =
$section_storage->
getSections();
$contexts =
$this->
getPopulatedContexts($section_storage);
$region_options =
[];
foreach ($sections as $section_delta =>
$section) { $layout =
$section->
getLayout($contexts);
$layout_definition =
$layout->
getPluginDefinition();
if (!
($section_label =
$section->
getLayoutSettings()['label'
])) { $section_label =
$this->
t('Section: @delta',
['@delta' =>
$section_delta + 1
])->
render();
} foreach ($layout_definition->
getRegions() as $region_name =>
$region_info) { // Group regions by section.
$region_options[$section_label]["
$section_delta:
$region_name"
] =
$this->
t( '@section, Region: @region',
['@section' =>
$section_label, '@region' =>
$region_info['label'
]] );
} } // $this->region and $this->delta are where the block is currently placed.
// $selected_region and $selected_delta are the values from this form
// specifying where the block should be moved to.