AjaxTestCommandReturnPromise.php

Same filename in other branches
  1. 10 core/modules/system/tests/modules/ajax_test/src/Ajax/AjaxTestCommandReturnPromise.php
  2. 11.x core/modules/system/tests/modules/ajax_test/src/Ajax/AjaxTestCommandReturnPromise.php

Namespace

Drupal\ajax_test\Ajax

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

Title Deprecated Summary
AjaxTestCommandReturnPromise Test Ajax command.

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