public function OpenDialogCommand::render in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Ajax/OpenDialogCommand.php \Drupal\Core\Ajax\OpenDialogCommand::render()
- 9 core/lib/Drupal/Core/Ajax/OpenDialogCommand.php \Drupal\Core\Ajax\OpenDialogCommand::render()
Implements \Drupal\Core\Ajax\CommandInterface:render().
File
- core/
lib/ Drupal/ Core/ Ajax/ OpenDialogCommand.php, line 128
Class
- OpenDialogCommand
- Defines an AJAX command to open certain content in a dialog.
Namespace
Drupal\Core\AjaxCode
public function render() {
// For consistency ensure the modal option is set to TRUE or FALSE.
$this->dialogOptions['modal'] = isset($this->dialogOptions['modal']) && $this->dialogOptions['modal'];
return [
'command' => 'openDialog',
'selector' => $this->selector,
'settings' => $this->settings,
'data' => $this
->getRenderedContent(),
'dialogOptions' => $this->dialogOptions,
];
}