get('view');
$form['#title'] = $this->t('View analysis');
$form['#section'] = 'analyze';
$analyzer = Views::analyzer();
$messages = $analyzer->getMessages($view->getExecutable());
$form['analysis'] = [
'#prefix' => '
',
'#suffix' => '
',
'#markup' => $analyzer->formatMessages($messages),
];
// Inform the standard button function that we want an OK button.
$form_state->set('ok_button', TRUE);
$view->getStandardButtons($form, $form_state, 'views_ui_analyze_view_form');
return $form;
}
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
/** @var $view \Drupal\views_ui\ViewUI */
$view = $form_state->get('view');
$form_state->setRedirectUrl($view->urlInfo('edit-form'));
}
}