You are here

function _quicktabs_get_views_displays in Quick Tabs 7.3

Same name and namespace in other branches
  1. 6.3 includes/admin.inc \_quicktabs_get_views_displays()
  2. 6 quicktabs.module \_quicktabs_get_views_displays()
  3. 6.2 includes/admin.inc \_quicktabs_get_views_displays()
  4. 7.2 includes/admin.inc \_quicktabs_get_views_displays()

Helper function to get all view displays.

2 calls to _quicktabs_get_views_displays()
QuickViewContent::optionsForm in plugins/QuickViewContent.inc
Method for returning the form elements to display for this tab type on the admin form.
_quicktabs_replace_view_displays_callback in ./quicktabs.admin.inc
Ajax callback, triggered when view is changed.

File

./quicktabs.admin.inc, line 605
Provides the Quicktabs administrative interface.

Code

function _quicktabs_get_views_displays($view_name) {
  $displays = array();
  if (empty($view_name)) {

    // No view.
    return $displays;
  }
  $views = views_get_all_views();
  $view = $views[$view_name];
  if (empty($view->display)) {

    // This view is broken.
    return $displays;
  }
  foreach ($view->display as $id => $display) {
    $displays[$id] = $id . ': ' . $display->display_title;
  }
  return $displays;
}