AjaxTestCommandReturnPromise.php

Same filename in other branches
  1. 9 core/modules/system/tests/modules/ajax_test/src/Ajax/AjaxTestCommandReturnPromise.php
  2. 10 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

declare (strict_types=1);
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.