protected function BreakpointGroup::loadAllBreakpoints

Loads all breakpoints, remove non-existing ones.

Return value

array Array containing breakpoints keyed by their id.

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

File

drupal/core/modules/breakpoint/lib/Drupal/breakpoint/Plugin/Core/Entity/BreakpointGroup.php, line 205
Definition of Drupal\breakpoint\Plugin\Core\Entity\BreakpointGroup.

Class

BreakpointGroup
Defines the BreakpointGroup entity.

Namespace

Drupal\breakpoint\Plugin\Core\Entity

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;
    }
  }
}