Implements \Drupal\Core\Ajax\CommandInterface:render().
Overrides CommandInterface::render
public function render() {
// Add the library for handling the dialog in the response.
drupal_add_library('system', 'drupal.dialog.ajax');
// For consistency ensure the modal option is set to TRUE or FALSE.
$this->dialogOptions['modal'] = isset($this->dialogOptions['modal']) && $this->dialogOptions['modal'];
return array(
'command' => 'openDialog',
'selector' => $this->selector,
'settings' => $this->settings,
'data' => $this->html,
'dialogOptions' => $this->dialogOptions,
);
}