protected function ResponsiveTrait::submitBreakpointsConfigurationForm in Bootstrap Styles 1.0.x
Save the breakpoints fields values to the configuration.
Parameters
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
array $fields: The array of field names.
2 calls to ResponsiveTrait::submitBreakpointsConfigurationForm()
- BackgroundColor::submitConfigurationForm in src/
Plugin/ BootstrapStyles/ Style/ BackgroundColor.php - TextColor::submitConfigurationForm in src/
Plugin/ BootstrapStyles/ Style/ TextColor.php
File
- src/
ResponsiveTrait.php, line 175
Class
- ResponsiveTrait
- A Trait for responsive methods.
Namespace
Drupal\bootstrap_stylesCode
protected function submitBreakpointsConfigurationForm(FormStateInterface $form_state, array $fields) {
// Loop through the fields.
foreach ($fields as $field_name) {
// Loop through the breakpoints.
foreach ($this
->getBreakpointsKeys() as $breakpoint) {
$this
->config()
->set($field_name . '_' . $breakpoint, $form_state
->getValue($field_name . '_' . $breakpoint))
->save();
}
}
}