You are here

public function dsEmptyRegionRender::plugin_form in Display Suite 6.3

plugin_form().

File

plugins/ds_extension/emptyregionrender.inc, line 26

Class

dsEmptyRegionRender

Code

public function plugin_form(&$form, $display_settings) {
  $form['emptyregionrender'] = array(
    '#type' => 'fieldset',
    '#collapsible' => FALSE,
    '#collapsed' => FALSE,
    '#description' => t('Toggle regions you want to render when there are no fields in it or when field values are empty.'),
  );
  $build_mode = $form['#build_mode'];
  $regions = ds_regions();
  foreach ($regions as $region => $title) {
    if ($region != 'disabled') {
      $form['emptyregionrender']['region-render-' . $region] = array(
        '#title' => $title,
        '#type' => 'checkbox',
        '#default_value' => ds_default_value($display_settings, 'emptyregionrender', 'render', $region, ''),
      );
    }
  }
}