function views_ui_display_tab

Generate the summary output for a single display to render in a tab.

4 calls to views_ui_display_tab()
template_preprocess_views_ui_edit_view in includes/admin.inc
Preprocess the view edit page.
views_ui_add_display in includes/admin.inc
AJAX callback to add a display.
views_ui_clone_display in includes/admin.inc
AJAX callback to add a display.
views_ui_regenerate_tabs in includes/admin.inc
Regenerate the tabs for AJAX updates.

File

includes/admin.inc, line 1240

Code

function views_ui_display_tab($view, $display) {
    if (isset($display->handler)) {
        $plugin = $display->handler->definition;
    }
    if (empty($plugin)) {
        $title = isset($display->display_title) ? $display->display_title : t('Invalid');
        return array(
            $title,
            t("Error: Display @display refers to a plugin named '@plugin', but that plugin doesn't exist!", array(
                '@display' => $display->id,
                '@plugin' => $display->display_plugin,
            )),
        );
        // @todo We can do a better 'plugin does not exist' tab.
    }
    // The display should always be initialized prior to this call.
    if (empty($display->handler)) {
        return FALSE;
    }
    $body = theme('views_ui_edit_tab', $view, $display);
    return array(
        $display->display_title,
        $body,
    );
}