1 views_ui.admin.inc views_ui_get_display_tab($view, $display_id)

Returns a renderable array representing the configure page for one display.

File

core/modules/views_ui/views_ui.admin.inc, line 1577
Admin page callbacks for the Views UI module.

Code

function views_ui_get_display_tab($view, $display_id) {
  $build = array();
  $display = $view->display[$display_id];
  // If the plugin doesn't exist, display an error message instead of a
  // configure page.
  if (empty($display->handler)) {
    $title = isset($display->display_title) ? $display->display_title : t('Invalid');
    // @TODO: Improved UX for the case where a plugin is missing.
    $build['#markup'] = t("Error: Display @display refers to a plugin named '@plugin', but that plugin is not available.", array('@display' => $display->id, '@plugin' => $display->display_plugin));
  }
  // Build the content of the configure page.
  else {
    $build['details'] = views_ui_get_display_tab_details($view, $display);
  }
  // In AJAX context, views_ui_regenerate_tab() returns this outside of form
  // context, so hook_form_views_ui_edit_form_alter() is insufficient.
  backdrop_alter('views_ui_display_tab', $build, $view, $display_id);
  return $build;
}