You are here

protected function Form::massageClasses in GridStack 8.2

Returns merged classes for .row or .box__content.

1 call to Form::massageClasses()
Form::validateConfigurationForm in src/Plugin/gridstack/stylizer/Form.php

File

src/Plugin/gridstack/stylizer/Form.php, line 178

Class

Form
Provides the form elements.

Namespace

Drupal\gridstack\Plugin\gridstack\stylizer

Code

protected function massageClasses($name, array $settings, FormStateInterface $form_state) {
  $wrapper_class = isset($settings['wrapper_classes']) ? $settings['wrapper_classes'] : '';
  $selected_classes = isset($settings['preset_classes']) ? $settings['preset_classes'] : [];
  $classes = [];
  if ($classes = $this->manager
    ->getMergedClasses(TRUE)) {
    $classes = array_combine($classes, $classes);
  }
  $this
    ->massageAllClasses($form_state, $name, $wrapper_class, $selected_classes, $classes);
}