function InsertCommand::render

Same name in other branches
  1. 9 core/lib/Drupal/Core/Ajax/InsertCommand.php \Drupal\Core\Ajax\InsertCommand::render()
  2. 8.9.x core/lib/Drupal/Core/Ajax/InsertCommand.php \Drupal\Core\Ajax\InsertCommand::render()
  3. 11.x core/lib/Drupal/Core/Ajax/InsertCommand.php \Drupal\Core\Ajax\InsertCommand::render()

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

Overrides CommandInterface::render

6 methods override InsertCommand::render()
AfterCommand::render in core/lib/Drupal/Core/Ajax/AfterCommand.php
Implements Drupal\Core\Ajax\CommandInterface:render().
AppendCommand::render in core/lib/Drupal/Core/Ajax/AppendCommand.php
Implements Drupal\Core\Ajax\CommandInterface:render().
BeforeCommand::render in core/lib/Drupal/Core/Ajax/BeforeCommand.php
Implements Drupal\Core\Ajax\CommandInterface:render().
HtmlCommand::render in core/lib/Drupal/Core/Ajax/HtmlCommand.php
Implements Drupal\Core\Ajax\CommandInterface:render().
PrependCommand::render in core/lib/Drupal/Core/Ajax/PrependCommand.php
Implements Drupal\Core\Ajax\CommandInterface:render().

... See full list

File

core/lib/Drupal/Core/Ajax/InsertCommand.php, line 67

Class

InsertCommand
Generic AJAX command for inserting content.

Namespace

Drupal\Core\Ajax

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.