You are here

function tvi_get_view_displays in Taxonomy Views Integrator 7

Same name and namespace in other branches
  1. 8 tvi.module \tvi_get_view_displays()
  2. 6 includes/tvi.admin.inc \tvi_get_view_displays()

Gathers the available views display options.

Return value

array All available views displays.

1 call to tvi_get_view_displays()
tvi_taxonomy_admin_form in includes/tvi.admin.inc
The main TVI administration form.

File

includes/tvi.admin.inc, line 293
Administration functions for the tvi module.

Code

function tvi_get_view_displays() {
  $displays = array();
  foreach (tvi_get_views(TRUE) as $view_name => $view) {
    foreach ($view->display as $display_name => $display) {

      // Ignore the "default" displays.
      if ($display_name == 'default' || $display->display_plugin == 'default') {
        continue;
      }

      // Ignore disabled displays.
      if (array_key_exists('enabled', $display->display_options) && $display->display_options['enabled'] === FALSE) {
        continue;
      }
      $displays[$view_name . ':' . $display_name] = $view->name . ' - ' . $display->display_title . ' [' . $display->id . ']';
    }
  }
  return $displays;
}