class AjaxTestCommandReturnPromise
Same name and namespace in other branches
- 9 core/modules/system/tests/modules/ajax_test/src/Ajax/AjaxTestCommandReturnPromise.php \Drupal\ajax_test\Ajax\AjaxTestCommandReturnPromise
- 10 core/modules/system/tests/modules/ajax_test/src/Ajax/AjaxTestCommandReturnPromise.php \Drupal\ajax_test\Ajax\AjaxTestCommandReturnPromise
Test Ajax command.
Hierarchy
- class \Drupal\Core\Ajax\InsertCommand extends \Drupal\Core\Ajax\CommandInterface, \Drupal\Core\Ajax\CommandWithAttachedAssetsInterface uses \Drupal\Core\Ajax\CommandWithAttachedAssetsTrait
- class \Drupal\Core\Ajax\AppendCommand implements \Drupal\Core\Ajax\InsertCommand
- class \Drupal\ajax_test\Ajax\AjaxTestCommandReturnPromise implements \Drupal\Core\Ajax\AppendCommand
- class \Drupal\Core\Ajax\AppendCommand implements \Drupal\Core\Ajax\InsertCommand
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\AjaxView 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.