AjaxTestCommandReturnPromise.php in Drupal 10
Namespace
Drupal\ajax_test\AjaxFile
core/modules/system/tests/modules/ajax_test/src/Ajax/AjaxTestCommandReturnPromise.phpView 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
Name![]() |
Description |
---|---|
AjaxTestCommandReturnPromise | Test Ajax command. |