You are here

class EntityReferenceFilterInsertNoWrapCommand in Views Reference Filter 8

AJAX command for calling the jQuery html() method.

The 'EntityReferenceFilterInsertNoWrapCommand/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.AjaxCommands.prototype.EntityReferenceFilterInsertNoWrapCommand() defined in js/entityreference_filter.js.

Hierarchy

Expanded class hierarchy of EntityReferenceFilterInsertNoWrapCommand

See also

https://api.jquery.com/html/

1 file declares its use of EntityReferenceFilterInsertNoWrapCommand
EntityReferenceFilterAjaxController.php in src/Controller/EntityReferenceFilterAjaxController.php

File

src/Ajax/EntityReferenceFilterInsertNoWrapCommand.php, line 23

Namespace

Drupal\entityreference_filter\Ajax
View source
class EntityReferenceFilterInsertNoWrapCommand extends HtmlCommand {

  /**
   * Implements Drupal\Core\Ajax\CommandInterface:render().
   */
  public function render() {
    return [
      'command' => 'entityReferenceFilterInsertNoWrapCommand',
      'method' => 'html',
      'selector' => $this->selector,
      'data' => $this
        ->getRenderedContent(),
      'settings' => $this->settings,
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CommandWithAttachedAssetsTrait::$attachedAssets protected property The attached assets for this Ajax command.
CommandWithAttachedAssetsTrait::getAttachedAssets public function Gets the attached assets.
CommandWithAttachedAssetsTrait::getRenderedContent protected function Processes the content for output.
EntityReferenceFilterInsertNoWrapCommand::render public function Implements Drupal\Core\Ajax\CommandInterface:render(). Overrides HtmlCommand::render
InsertCommand::$content protected property The content for the matched element(s).
InsertCommand::$selector protected property A CSS selector string.
InsertCommand::$settings protected property A settings array to be passed to any attached JavaScript behavior.
InsertCommand::__construct public function Constructs an InsertCommand object.