You are here

protected function flot_views_plugin_style::get_views_by_style in Flot 6

Retrieve all views that have the specified style plugin.

1 call to flot_views_plugin_style::get_views_by_style()
flot_views_plugin_style::options_form in views/flot_views_plugin_style.inc

File

views/flot_views_plugin_style.inc, line 107

Class

flot_views_plugin_style

Code

protected function get_views_by_style($style_plugin = 'flot') {
  $views = views_get_all_views();
  $usable = array();
  foreach ($views as $view) {
    foreach (array_keys($view->display) as $display) {
      $view
        ->set_display($display);
      if ($view->display_handler
        ->get_option('style_plugin') === $style_plugin) {
        $usable["{$view->name}:{$display}"] = "{$view->name}:{$display}";
      }
    }
    $view
      ->destroy();
  }
  ksort($usable);
  return $usable;
}