You are here

protected function ResponsiveTrait::saveBreakpointsStyleFormFields in Bootstrap Styles 1.0.x

Save the breakpoints fields values to the storage.

Parameters

array $group_elements: The submitted form values array.

array $storage: An associative array containing the form storage.

array $fields: The array of field names.

2 calls to ResponsiveTrait::saveBreakpointsStyleFormFields()
BackgroundColor::submitStyleFormElements in src/Plugin/BootstrapStyles/Style/BackgroundColor.php
TextColor::submitStyleFormElements in src/Plugin/BootstrapStyles/Style/TextColor.php

File

src/ResponsiveTrait.php, line 337

Class

ResponsiveTrait
A Trait for responsive methods.

Namespace

Drupal\bootstrap_styles

Code

protected function saveBreakpointsStyleFormFields(array $group_elements, array &$storage, array $fields) {

  // Loop through the fields.
  foreach ($fields as $field_name) {

    // Loop through the breakpoints.
    foreach ($this
      ->getBreakpointsKeys() as $breakpoint) {
      $storage[$field_name . '_' . $breakpoint] = [
        'class' => $group_elements[$field_name . '_' . $breakpoint],
      ];
    }
  }
}