// These forms have the title built in, so set the title here:
$title =
$form_state->
get('title'
) ?: '';
if ($ajax && (!
$form_state->
isExecuted() ||
$form_state->
get('rerender'
))) { // If the form didn't execute and we're using ajax, build up an
// Ajax command list to execute.
$response =
new AjaxResponse();
// Attach the library necessary for using the OpenModalDialogCommand and
// set the attachments for this Ajax response.
$form['#attached'
]['library'
][] = 'core/drupal.dialog.ajax';
$response->
setAttachments($form['#attached'
]);
$display = '';
$status_messages =
['#type' => 'status_messages'
];
if ($messages =
$renderer->
renderRoot($status_messages)) { $display = '<div class="views-messages">' .
$messages . '</div>';
} $display .=
$output;
$options =
[ 'dialogClass' => 'views-ui-dialog js-views-ui-dialog',
'width' => '75%',
];