You are here

public function LayoutOption::getBreakpointsIds in Bootstrap Layout Builder 2.x

Same name and namespace in other branches
  1. 1.x src/Entity/LayoutOption.php \Drupal\bootstrap_layout_builder\Entity\LayoutOption::getBreakpointsIds()

Returns array of enabled breakpoints ids.

Return value

array The breakpoints ids.

Overrides LayoutOptionInterface::getBreakpointsIds

File

src/Entity/LayoutOption.php, line 163

Class

LayoutOption
Defines the layout option entity class.

Namespace

Drupal\bootstrap_layout_builder\Entity

Code

public function getBreakpointsIds() {
  $ids = [];
  if ($this->breakpoints) {
    foreach ($this->breakpoints as $key => $value) {
      if ($value) {
        $ids[] = $key;
      }
    }
  }
  return $ids;
}