You are here

public function dsRegionToBlock::plugin_form_submit in Display Suite 6.3

plugin_form_submit().

File

plugins/ds_extension/regiontoblock.inc, line 56

Class

dsRegionToBlock

Code

public function plugin_form_submit($form, $form_state, &$display_settings) {
  $regions = ds_get_regions($display_settings['layout']);
  $regions_save = array();
  $build_mode = $form['#build_mode'];
  foreach ($regions as $key => $region) {
    if (isset($form_state['values']['regiontoblock']['region-block-' . $key])) {
      $regions_save['block'][$key] = $form_state['values']['regiontoblock']['region-block-' . $key];
    }
  }
  $display_settings[$build_mode]['regiontoblock'] = $regions_save;
}