public function SetDialogOptionCommand::__construct

public SetDialogOptionCommand::__construct($selector, $option_name, $option_value)

Constructs a SetDialogOptionCommand object.

Parameters

string $selector: The selector of the dialog whose title will be set. If set to an empty value, the default modal dialog will be selected.

string $option_name: The name of the option to set. May be any jQuery UI dialog option. See http://api.jqueryui.com/dialog.

mixed $option_value: The value of the option to be passed to the dialog.

File

core/lib/Drupal/Core/Ajax/SetDialogOptionCommand.php, line 45

Class

SetDialogOptionCommand
Defines an AJAX command that sets jQuery UI dialog properties.

Namespace

Drupal\Core\Ajax

Code

public function __construct($selector, $option_name, $option_value) {
  $this->selector = $selector ? $selector : '#drupal-modal';
  $this->optionName = $option_name;
  $this->optionValue = $option_value;
}

© 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!SetDialogOptionCommand.php/function/SetDialogOptionCommand::__construct/8.1.x