You are here

public function GridStack::getEndBreakpointGrids in GridStack 8

Returns options.breakpoints.[lg|xl].[grids|nested].

Parameters

string $current: The name of specific property holding grids: grids, or nested.

Return value

mixed|array Available grids by the given $current parameter, else empty.

1 call to GridStack::getEndBreakpointGrids()
GridStack::getNestedGridsByDelta in src/Entity/GridStack.php
Returns the current nested grids with preserved indices even if empty.

File

src/Entity/GridStack.php, line 185

Class

GridStack
Defines the GridStack configuration entity.

Namespace

Drupal\gridstack\Entity

Code

public function getEndBreakpointGrids($current = 'grids') {
  $build = [];
  foreach ($this
    ->getBreakpoints() as $key => $breakpoint) {
    if (empty($breakpoint['grids'])) {
      continue;
    }
    $build[$key] = $breakpoint;
  }
  $keys = array_keys($build);
  $end = end($keys);
  return $this
    ->getBreakpointGrids($end, $current);
}