<?php/**
* @file
* Definition of Drupal\Core\Ajax\HtmlCommand.
*/namespaceDrupal\Core\Ajax;
useDrupal\Core\Ajax\InsertCommand;
/**
* AJAX command for calling the jQuery html() method.
*
* The 'insert/html' command instructs the client to use jQuery's html() method
* to set the HTML content of each element matched by the given selector while
* leaving the outer tags intact.
*
* This command is implemented by Drupal.ajax.prototype.commands.insert()
* defined in misc/ajax.js.
*
* @see http://docs.jquery.com/Attributes/html#val
*/class HtmlCommandextends InsertCommand {
/**
* Implements Drupal\Core\Ajax\CommandInterface:render().
*/
public functionrender() {
returnarray(
'command' => 'insert',
'method' => 'html',
'selector' => $this->selector,
'data' => $this->html,
'settings' => $this->settings,
);
}
}