public function OpenDialogCommand::render

public OpenDialogCommand::render()

Implements \Drupal\Core\Ajax\CommandInterface:render().

Overrides CommandInterface::render

File

core/lib/Drupal/Core/Ajax/OpenDialogCommand.php, line 125

Class

OpenDialogCommand
Defines an AJAX command to open certain content in a dialog.

Namespace

Drupal\Core\Ajax

Code

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 array(
    'command' => 'openDialog',
    'selector' => $this->selector,
    'settings' => $this->settings,
    'data' => $this->getRenderedContent(),
    'dialogOptions' => $this->dialogOptions,
  );
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Ajax!OpenDialogCommand.php/function/OpenDialogCommand::render/8.1.x