You are here

WebformHtmlCommand.php in Webform 6.x

Same filename and directory in other branches
  1. 8.5 src/Ajax/WebformHtmlCommand.php

File

src/Ajax/WebformHtmlCommand.php
View source
<?php

namespace Drupal\webform\Ajax;

use Drupal\Core\Ajax\HtmlCommand;

/**
 * Provides an Ajax command for calling the jQuery html() method.
 *
 * This command is implemented in Drupal.AjaxCommands.prototype.webformHtml.
 */
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,
    ];
  }

}

Classes

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