You are here

protected function GridStackFormBase::getApplicableBreakpoints in GridStack 8.2

Returns the applicable breakpoints.

2 calls to GridStackFormBase::getApplicableBreakpoints()
GridStackFormBase::breakpointElements in modules/gridstack_ui/src/Form/GridStackFormBase.php
Defines breakpoints form adopted from Blazy deprecated methods.
GridStackFormBase::initEngine in modules/gridstack_ui/src/Form/GridStackFormBase.php
Initializes the layout engine.
1 method overrides GridStackFormBase::getApplicableBreakpoints()
GridStackVariantForm::getApplicableBreakpoints in modules/gridstack_ui/src/Form/GridStackVariantForm.php
Returns the applicable breakpoints.

File

modules/gridstack_ui/src/Form/GridStackFormBase.php, line 677

Class

GridStackFormBase
Extends base form for gridstack instance configuration form.

Namespace

Drupal\gridstack_ui\Form

Code

protected function getApplicableBreakpoints() {
  $engine = isset($this->engine) ? $this->engine : NULL;
  $breakpoints = $engine ? $engine
    ->sizes() : GridStackDefault::breakpoints();
  $breakpoints = array_keys($breakpoints);

  // Only provides one breakpoint for default.
  if ($this
    ->gridStack()
    ->id() == 'default') {
    $breakpoints = [
      'lg',
    ];
  }
  return $breakpoints;
}