You are here

AjaxTestCommandReturnPromise.php in Drupal 10

File

core/modules/system/tests/modules/ajax_test/src/Ajax/AjaxTestCommandReturnPromise.php
View source
<?php

namespace Drupal\ajax_test\Ajax;

use Drupal\Core\Ajax\AppendCommand;

/**
 * Test Ajax command.
 */
class AjaxTestCommandReturnPromise extends AppendCommand {

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

}

Classes

Namesort descending Description
AjaxTestCommandReturnPromise Test Ajax command.