public function OpenDialogCommand::__construct

public OpenDialogCommand::__construct($selector, $title, $content, array $dialog_options = array(), $settings = NULL)

Constructs an OpenDialogCommand object.

Parameters

string $selector: The selector of the dialog.

string $title: The title of the dialog.

string|array $content: The content that will be placed in the dialog, either a render array or an HTML string.

array $dialog_options: (optional) Options to be passed to the dialog implementation. Any jQuery UI option can be used. See http://api.jqueryui.com/dialog.

array|null $settings: (optional) Custom settings that will be passed to the Drupal behaviors on the content of the dialog. If left empty, the settings will be populated automatically from the current request.

File

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

Class

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

Namespace

Drupal\Core\Ajax

Code

public function __construct($selector, $title, $content, array $dialog_options = array(), $settings = NULL) {
  $dialog_options += array('title' => $title);
  $this->selector = $selector;
  $this->content = $content;
  $this->dialogOptions = $dialog_options;
  $this->settings = $settings;
}

© 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::__construct/8.1.x