protected function ComponentFormBase::getLayoutRegions in Layout Paragraphs 2.0.x
Returns an array of regions for a given layout.
Parameters
string $layout_id: The layout id.
Return value
array An array of regions.
1 call to ComponentFormBase::getLayoutRegions()
- ComponentFormBase::getLayoutRegionNames in src/
Form/ ComponentFormBase.php - Returns an array of region names for a given layout.
File
- src/
Form/ ComponentFormBase.php, line 508
Class
- ComponentFormBase
- Class LayoutParagraphsComponentFormBase.
Namespace
Drupal\layout_paragraphs\FormCode
protected function getLayoutRegions($layout_id) {
if (!$layout_id) {
return [];
}
$instance = $this->layoutPluginManager
->createInstance($layout_id);
$definition = $instance
->getPluginDefinition();
return $definition
->getRegions();
}