You are here

protected function BreakpointGroup::loadAllBreakpoints in Breakpoints 8

Load all breakpoints, remove non-existing ones.

Return value

array Array containing breakpoints keyed by their id.

2 calls to BreakpointGroup::loadAllBreakpoints()
BreakpointGroup::save in lib/Drupal/breakpoint/BreakpointGroup.php
Overrides Drupal\Core\Entity::save().
BreakpointGroup::__construct in lib/Drupal/breakpoint/BreakpointGroup.php
Overrides Drupal\config\ConfigEntityBase::__construct().

File

lib/Drupal/breakpoint/BreakpointGroup.php, line 340
Definition of Drupal\breakpoint\BreakpointGroup.

Class

BreakpointGroup
Defines the BreakpointGroup entity.

Namespace

Drupal\breakpoint

Code

protected function loadAllBreakpoints() {
  $breakpoints = $this->breakpoints;
  $this->breakpoints = array();
  foreach ($breakpoints as $breakpoint_id) {
    $breakpoint = breakpoint_load($breakpoint_id);
    if ($breakpoint) {
      $this->breakpoints[$breakpoint_id] = $breakpoint;
    }
  }
}