You are here

public function WebformHtmlCommand::render in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Ajax/WebformHtmlCommand.php \Drupal\webform\Ajax\WebformHtmlCommand::render()

Implements Drupal\Core\Ajax\CommandInterface:render().

Overrides HtmlCommand::render

File

src/Ajax/WebformHtmlCommand.php, line 17

Class

WebformHtmlCommand
Provides an Ajax command for calling the jQuery html() method.

Namespace

Drupal\webform\Ajax

Code

public function render() {
  return [
    'command' => 'webformInsert',
    'method' => 'html',
    'selector' => $this->selector,
    'data' => $this
      ->getRenderedContent(),
    'settings' => $this->settings,
  ];
}