You are here

function ds_forms_render_region in Display Suite 7.2

Same name and namespace in other branches
  1. 7 modules/ds_forms/ds_forms.module \ds_forms_render_region()

Render a form region.

Parameters

$content: An array of content fields.

$region: The name of region to render.

$layout: The layout definition.

1 call to ds_forms_render_region()
ds_forms_preprocess_ds_forms_custom_form in modules/ds_forms/ds_forms.module
Implements hook_preprocess_ds_forms_custom_form().

File

modules/ds_forms/ds_forms.module, line 214
Display Suite forms integration.

Code

function ds_forms_render_region(&$content, $region, $layout) {
  $output = '';
  if (isset($layout['settings']['regions'][$region])) {
    foreach ($layout['settings']['regions'][$region] as $key => $field) {
      if ($region == 'hidden') {
        $content[$field]['#access'] = FALSE;
      }
      else {
        $output .= drupal_render($content[$field]);
      }
    }
  }
  return $output;
}