You are here

function vefl_theme_views_exposed_form_ds in Views exposed form layout 7

Theme function for Views exposed form.

Wraps form field into regions.

See also

_vefl_form_theme_functions()

1 string reference to 'vefl_theme_views_exposed_form_ds'
vefl_theme in ./vefl.module
Implements hook_theme().

File

includes/ds.inc, line 38
Provides Panels integration.

Code

function vefl_theme_views_exposed_form_ds(&$vars) {
  $layout_id = $vars['form']['#layout']['layout_id'];

  // Prepare content to output in panels.
  $content = array();
  foreach ($vars['region_widgets'] as $region => $widgets) {
    $content[$region] = '';
    foreach ($widgets as $widget) {
      $content[$region] .= theme('views_exposed_widget', array(
        'widget' => $widget,
      ));
    }
    $content[$region . '_wrapper'] = 'div';
    $content[$region . '_classes'] = '';
  }
  $content['layout_wrapper'] = 'div';
  $content['layout_attributes'] = '';
  $content['region_widgets'] = $vars['region_widgets'];
  drupal_add_css(drupal_get_path('module', 'ds') . '/layouts/' . $layout_id . '/' . $layout_id . '.css');

  // Outputs content in panels layout.
  return theme($layout_id, $content);
}