class WebformHtmlCommand in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Ajax/WebformHtmlCommand.php \Drupal\webform\Ajax\WebformHtmlCommand
Provides an Ajax command for calling the jQuery html() method.
This command is implemented in Drupal.AjaxCommands.prototype.webformHtml.
Hierarchy
- class \Drupal\Core\Ajax\InsertCommand implements CommandInterface, CommandWithAttachedAssetsInterface uses CommandWithAttachedAssetsTrait
- class \Drupal\Core\Ajax\HtmlCommand
- class \Drupal\webform\Ajax\WebformHtmlCommand
- class \Drupal\Core\Ajax\HtmlCommand
Expanded class hierarchy of WebformHtmlCommand
1 file declares its use of WebformHtmlCommand
File
- src/
Ajax/ WebformHtmlCommand.php, line 12
Namespace
Drupal\webform\AjaxView source
class WebformHtmlCommand extends HtmlCommand {
/**
* Implements Drupal\Core\Ajax\CommandInterface:render().
*/
public function render() {
return [
'command' => 'webformInsert',
'method' => 'html',
'selector' => $this->selector,
'data' => $this
->getRenderedContent(),
'settings' => $this->settings,
];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CommandWithAttachedAssetsTrait:: |
protected | property | The attached assets for this Ajax command. | |
CommandWithAttachedAssetsTrait:: |
public | function | Gets the attached assets. | |
CommandWithAttachedAssetsTrait:: |
protected | function | Processes the content for output. | |
InsertCommand:: |
protected | property | The content for the matched element(s). | |
InsertCommand:: |
protected | property | A CSS selector string. | |
InsertCommand:: |
protected | property | A settings array to be passed to any attached JavaScript behavior. | |
InsertCommand:: |
public | function | Constructs an InsertCommand object. | |
WebformHtmlCommand:: |
public | function |
Implements Drupal\Core\Ajax\CommandInterface:render(). Overrides HtmlCommand:: |