You are here

protected function GridStackVariantForm::getApplicableBreakpoints in GridStack 8.2

Returns the applicable breakpoints.

Overrides GridStackFormBase::getApplicableBreakpoints

File

modules/gridstack_ui/src/Form/GridStackVariantForm.php, line 413

Class

GridStackVariantForm
Extends base form for gridstack instance configuration form.

Namespace

Drupal\gridstack_ui\Form

Code

protected function getApplicableBreakpoints() {
  $gridstack = $this
    ->gridStack();
  $breakpoints = $gridstack ? [
    $gridstack
      ->getLastBreakpointKey(),
  ] : [
    'lg',
  ];

  // Allows alterations by those who can afford complication.
  $this->manager
    ->getModuleHandler()
    ->alter('gridstack_variant_applicable_breakpoints', $breakpoints, $gridstack, $this->engine, $this
    ->currentUser());
  return $breakpoints;
}