public function BootstrapLayout::getRegionClasses in Bootstrap Layout Builder 1.x
Same name and namespace in other branches
- 2.x src/Plugin/Layout/BootstrapLayout.php \Drupal\bootstrap_layout_builder\Plugin\Layout\BootstrapLayout::getRegionClasses()
Returns region class of a breakpoint.
Parameters
int $key: The position of region.
array $breakpoints: The layout active breakpoints.
Return value
array The region classes of all breakpoints.
1 call to BootstrapLayout::getRegionClasses()
- BootstrapLayout::submitConfigurationForm in src/
Plugin/ Layout/ BootstrapLayout.php - Form submission handler.
File
- src/
Plugin/ Layout/ BootstrapLayout.php, line 515
Class
- BootstrapLayout
- A layout from our bootstrap layout builder.
Namespace
Drupal\bootstrap_layout_builder\Plugin\LayoutCode
public function getRegionClasses(int $key, array $breakpoints) {
$classes = [];
foreach ($breakpoints as $breakpoint_id => $strucutre_id) {
$breakpoint = $this->entityTypeManager
->getStorage('blb_breakpoint')
->load($breakpoint_id);
$classes[] = $breakpoint
->getClassByPosition($key, $strucutre_id);
}
return $classes;
}