protected function ResponsiveTrait::saveBreakpointsStyleFormClassIndexBasedFields 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.
File
- src/
ResponsiveTrait.php, line 359
Class
- ResponsiveTrait
- A Trait for responsive methods.
Namespace
Drupal\bootstrap_stylesCode
protected function saveBreakpointsStyleFormClassIndexBasedFields(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' => $this
->getStyleOptionClassByIndex($field_name . '_' . $breakpoint, $group_elements[$field_name . '_' . $breakpoint]),
];
}
}
}