You are here

public function ds_cssoverrider::plugin_form_submit in Display Suite 6

Same name and namespace in other branches
  1. 6.2 plugins/ds_cssoverrider.inc \ds_cssoverrider::plugin_form_submit()

plugin_form_submit().

File

plugins/ds_cssoverrider.inc, line 52
DS_CSSOverrider: plugin to override css per region.

Class

ds_cssoverrider
@file DS_CSSOverrider: plugin to override css per region.

Code

public function plugin_form_submit($form, $form_state, &$display_settings) {
  $regions = ds_regions();
  $css_save = array();
  $build_mode = $form['#build_mode'];
  foreach ($regions as $region => $title) {
    if ($region != 'disabled') {
      $css_save['class'][$region] = $form_state['values']['cssoverrider']['region-class-' . $region];
      $css_save['inline'][$region] = $form_state['values']['cssoverrider']['region-inline-' . $region];
    }
  }
  $display_settings[$build_mode]['cssoverrider'] = $css_save;
}