class WebformConfirmReloadCommand in Webform 8.5
Same name and namespace in other branches
- 6.x src/Ajax/WebformConfirmReloadCommand.php \Drupal\webform\Ajax\WebformConfirmReloadCommand
Provides an Ajax command for confirming page reload.
This command is implemented in Drupal.AjaxCommands.prototype.webformConfirmReload.
Hierarchy
- class \Drupal\webform\Ajax\WebformConfirmReloadCommand implements CommandInterface
Expanded class hierarchy of WebformConfirmReloadCommand
1 file declares its use of WebformConfirmReloadCommand
- WebformAjaxFormTrait.php in src/
Form/ WebformAjaxFormTrait.php
File
- src/
Ajax/ WebformConfirmReloadCommand.php, line 12
Namespace
Drupal\webform\AjaxView source
class WebformConfirmReloadCommand implements CommandInterface {
/**
* The message to be displayed.
*
* @var string
*/
protected $message;
/**
* Constructs an WebformConfirmReloadCommand object.
*
* @param string $message
* The message to be displayed.
*/
public function __construct($message) {
$this->message = $message;
}
/**
* Implements \Drupal\Core\Ajax\CommandInterface:render().
*/
public function render() {
return [
'command' => 'webformConfirmReload',
'message' => $this->message,
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
WebformConfirmReloadCommand:: |
protected | property | The message to be displayed. | |
WebformConfirmReloadCommand:: |
public | function |
Implements \Drupal\Core\Ajax\CommandInterface:render(). Overrides CommandInterface:: |
|
WebformConfirmReloadCommand:: |
public | function | Constructs an WebformConfirmReloadCommand object. |