You are here

class AjaxTestCommandReturnPromise in Drupal 10

Test Ajax command.

Hierarchy

Expanded class hierarchy of AjaxTestCommandReturnPromise

1 file declares its use of AjaxTestCommandReturnPromise
AjaxTestFormPromise.php in core/modules/system/tests/modules/ajax_test/src/Form/AjaxTestFormPromise.php

File

core/modules/system/tests/modules/ajax_test/src/Ajax/AjaxTestCommandReturnPromise.php, line 10

Namespace

Drupal\ajax_test\Ajax
View source
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,
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AjaxTestCommandReturnPromise::render public function Implements Drupal\Core\Ajax\CommandInterface:render(). Overrides AppendCommand::render
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.
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.