You are here

public function GridStackVariantForm::closeVariant in GridStack 8.2

Callback for cancelling a layout variant.

File

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

Class

GridStackVariantForm
Extends base form for gridstack instance configuration form.

Namespace

Drupal\gridstack_ui\Form

Code

public function closeVariant(array $form, FormStateInterface $form_state) {
  $config = $form['variant_actions']['#settings'];
  $gridstack = $this
    ->gridStack();
  $editor = $this->manager
    ->stylizer()
    ->builder()
    ->getVariantEditor($config, $gridstack);
  return $editor['form'];
}