Implements \Drupal\Core\Form\FormInterface::buildForm().
Overrides FormInterface::buildForm
public function buildForm(array $form, array &$form_state) {
$view =& $form_state['view'];
$display_id = $form_state['display_id'];
$section = $form_state['section'];
$executable = $view
->get('executable');
if (!$executable
->setDisplay($display_id)) {
views_ajax_error(t('Invalid display id @display', array(
'@display' => $display_id,
)));
}
$display =& $executable->display[$display_id];
// Get form from the handler.
$form['options'] = array(
'#theme_wrappers' => array(
'container',
),
'#attributes' => array(
'class' => array(
'scroll',
),
),
);
$executable->display_handler
->buildOptionsForm($form['options'], $form_state);
// The handler options form sets $form['#title'], which we need on the entire
// $form instead of just the ['options'] section.
$form['#title'] = $form['options']['#title'];
unset($form['options']['#title']);
// Move the override dropdown out of the scrollable section of the form.
if (isset($form['options']['override'])) {
$form['override'] = $form['options']['override'];
unset($form['options']['override']);
}
$name = NULL;
if (isset($form_state['update_name'])) {
$name = $form_state['update_name'];
}
$view
->getStandardButtons($form, $form_state, 'views_ui_edit_display_form', $name);
return $form;
}