You are here

function vefl_theme_views_exposed_form_panels 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_panels'
vefl_theme in ./vefl.module
Implements hook_theme().

File

includes/panels.inc, line 34
Provides Panels integration.

Code

function vefl_theme_views_exposed_form_panels(&$vars) {
  ctools_include('plugins', 'panels');

  // 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,
      ));
    }
  }

  // Outputs content in panels layout.
  $layout_name = substr($vars['form']['#layout']['layout_id'], 7);
  $panel_content = panels_print_layout(panels_get_layout($layout_name), $content);
  return '<div class="views-exposed-form views-exposed-widgets clearfix">' . $panel_content . '</div>';
}