You are here

function views_ui_analyze_view_form in Views (for Drupal 7) 8.3

Same name and namespace in other branches
  1. 6.3 includes/admin.inc \views_ui_analyze_view_form()
  2. 6.2 includes/admin.inc \views_ui_analyze_view_form()
  3. 7.3 includes/admin.inc \views_ui_analyze_view_form()

Form constructor callback to display analysis information on a view

1 string reference to 'views_ui_analyze_view_form'
views_ui_ajax_forms in views_ui/admin.inc
Returns information about subforms for editing the pieces of a view.

File

views_ui/admin.inc, line 913
Provides the Views' administrative interface.

Code

function views_ui_analyze_view_form($form, &$form_state) {
  $view =& $form_state['view'];
  $form['#title'] = t('View analysis');
  $form['#section'] = 'analyze';
  $analyzer = new Analyzer($view);
  $messages = $analyzer
    ->getMessages();
  $form['analysis'] = array(
    '#prefix' => '<div class="form-item">',
    '#suffix' => '</div>',
    '#markup' => $analyzer
      ->formatMessages($messages),
  );

  // Inform the standard button function that we want an OK button.
  $form_state['ok_button'] = TRUE;
  $view
    ->getStandardButtons($form, $form_state, 'views_ui_analyze_view_form');
  return $form;
}