You are here

public function ds_emptyregionrender::plugin_form_submit in Display Suite 6

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

plugin_form_submit().

File

plugins/ds_emptyregionrender.inc, line 45
DS_EmptyRegionRender: Plugin to render an empty region.

Class

ds_emptyregionrender
@file DS_EmptyRegionRender: Plugin to render an empty region.

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']['emptyregionrender']['region-render-' . $region])) {
      $regions_save['render'][$region] = $form_state['values']['emptyregionrender']['region-render-' . $region];
    }
  }
  $display_settings[$build_mode]['emptyregionrender'] = $regions_save;
}