Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/Ajax/SetDialogOptionCommand.php \Drupal\Core\Ajax\SetDialogOptionCommand::__construct()
  2. 9 core/lib/Drupal/Core/Ajax/SetDialogOptionCommand.php \Drupal\Core\Ajax\SetDialogOptionCommand::__construct()

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.

1 method overrides SetDialogOptionCommand::__construct()
SetDialogTitleCommand::__construct in core/lib/Drupal/Core/Ajax/SetDialogTitleCommand.php
Constructs a SetDialogTitleCommand object.

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;
}