You are here

public function ds_regiontoblock::plugin_form_submit in Display Suite 6

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

plugin_form_submit().

File

plugins/ds_regiontoblock.inc, line 49
DS_RegionToBlock: Plugin to make a region available as a block.

Class

ds_regiontoblock
@file DS_RegionToBlock: Plugin to make a region available as a block.

Code

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