You are here

function vefl_theme in Views exposed form layout 7

Same name and namespace in other branches
  1. 8.3 vefl.module \vefl_theme()
  2. 8 vefl.module \vefl_theme()
  3. 8.2 vefl.module \vefl_theme()

Implements hook_theme().

File

./vefl.module, line 18
Provides functionality to output Views exposed filters in layout.

Code

function vefl_theme() {
  $path = drupal_get_path('module', 'vefl');
  $themes = array();
  $themes['views_exposed_widget'] = array(
    'render element' => 'elements',
    'arguments' => array(
      'widget' => NULL,
    ),
    'template' => 'views-exposed-widget',
    'path' => $path . '/theme',
  );
  if (module_exists('panels')) {
    $themes['vefl_views_exposed_form_panels'] = array(
      'render element' => 'form',
      'theme path' => $path,
      'function' => 'vefl_theme_views_exposed_form_panels',
      'preprocess functions' => array(
        'template_preprocess_views_exposed_form',
        // Use default Views preprocess
        'vefl_views_exposed_form_preprocess',
      ),
    );
  }
  if (module_exists('ds')) {
    $themes['vefl_views_exposed_form_ds'] = array(
      'render element' => 'form',
      'theme path' => $path,
      'function' => 'vefl_theme_views_exposed_form_ds',
      'preprocess functions' => array(
        'template_preprocess_views_exposed_form',
        // Use default Views preprocess
        'vefl_views_exposed_form_preprocess',
      ),
    );
  }
  return $themes;
}