class AjaxTestCommandReturnPromise

Same name and namespace in other branches
  1. 9 core/modules/system/tests/modules/ajax_test/src/Ajax/AjaxTestCommandReturnPromise.php \Drupal\ajax_test\Ajax\AjaxTestCommandReturnPromise
  2. 10 core/modules/system/tests/modules/ajax_test/src/Ajax/AjaxTestCommandReturnPromise.php \Drupal\ajax_test\Ajax\AjaxTestCommandReturnPromise

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 12

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

Title Sort descending Modifiers Object type Summary Overriden Title
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.

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