$executable =
$view->
getExecutable();
if (!
$executable->
setDisplay($display_id)) { $form['markup'
] =
['#markup' =>
$this->
t('Invalid display id @display',
['@display' =>
$display_id])];
return $form;
} // Get form from the handler.
$form['options'
] =
[ '#theme_wrappers' =>
['container'
],
'#attributes' =>
['class' =>
['scroll'
], 'data-drupal-views-scroll' => TRUE
],
];
$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'
]);
}