private function BootstrapLayoutDeriver::getRegions in Bootstrap Layout Builder 1.x
Same name and namespace in other branches
- 2.x src/Plugin/Deriver/BootstrapLayoutDeriver.php \Drupal\bootstrap_layout_builder\Plugin\Deriver\BootstrapLayoutDeriver::getRegions()
Get the formated array of row regions based on columns count.
Parameters
int $columns_count: The count of row columns.
Return value
array The row columns 'regions'.
1 call to BootstrapLayoutDeriver::getRegions()
- BootstrapLayoutDeriver::getDerivativeDefinitions in src/
Plugin/ Deriver/ BootstrapLayoutDeriver.php - Gets the definition of all derivatives of a base plugin.
File
- src/
Plugin/ Deriver/ BootstrapLayoutDeriver.php, line 105
Class
- BootstrapLayoutDeriver
- Makes a bootstrap layout for each layout config entity.
Namespace
Drupal\bootstrap_layout_builder\Plugin\DeriverCode
private function getRegions(int $columns_count) {
$regions = [];
for ($i = 1; $i <= $columns_count; $i++) {
$key = 'blb_region_col_' . $i;
$regions[$key] = [
'label' => $this
->t('Col') . ' ' . $i,
];
}
return $regions;
}