public function LayoutOption::getBreakpointsLabels in Bootstrap Layout Builder 2.x
Same name and namespace in other branches
- 1.x src/Entity/LayoutOption.php \Drupal\bootstrap_layout_builder\Entity\LayoutOption::getBreakpointsLabels()
Returns array of enabled breakpoints lablels.
Return value
array The breakpoints labels.
Overrides LayoutOptionInterface::getBreakpointsLabels
File
- src/
Entity/ LayoutOption.php, line 178
Class
- LayoutOption
- Defines the layout option entity class.
Namespace
Drupal\bootstrap_layout_builder\EntityCode
public function getBreakpointsLabels() {
$labels = [];
foreach ($this->breakpoints as $breakpoint_id) {
$breakpoint = $this
->entityTypeManager()
->getStorage('blb_breakpoint')
->load($breakpoint_id);
if ($breakpoint) {
$labels[] = $breakpoint
->label();
}
}
return $labels;
}