You are here

function _views_ui_get_displays_list in Views (for Drupal 7) 7.3

Helper function to get a list of displays included in a view.

Parameters

object $view: The view.

Return value

array An array of display types that this view includes.

1 call to _views_ui_get_displays_list()
theme_views_ui_view_info in includes/admin.inc
Theme function; returns basic administrative information about a view.

File

./views_ui.module, line 878
Provide structure for the administrative interface to Views.

Code

function _views_ui_get_displays_list($view) {
  $displays = array();
  foreach ($view->display as $display) {
    if (!empty($display->handler->definition['admin'])) {
      $displays[$display->handler->definition['admin']] = TRUE;
    }
  }
  if ($displays) {
    ksort($displays);
    $displays = array_keys($displays);
  }
  return $displays;
}