1. 8.5.x core/lib/Drupal/Core/Ajax/CommandInterface.php CommandInterface
  2. 8.0.x core/lib/Drupal/Core/Ajax/CommandInterface.php CommandInterface
  3. 8.1.x core/lib/Drupal/Core/Ajax/CommandInterface.php CommandInterface
  4. 8.2.x core/lib/Drupal/Core/Ajax/CommandInterface.php CommandInterface
  5. 8.3.x core/lib/Drupal/Core/Ajax/CommandInterface.php CommandInterface
  6. 8.4.x core/lib/Drupal/Core/Ajax/CommandInterface.php CommandInterface
  7. 8.6.x core/lib/Drupal/Core/Ajax/CommandInterface.php CommandInterface

AJAX command interface.

All AJAX commands passed to AjaxResponse objects should implement these methods.

Hierarchy

Expanded class hierarchy of CommandInterface

All classes that implement CommandInterface

Related topics

9 files declare their use of CommandInterface
AddStyleSheetCommand.php in core/modules/ckeditor/src/Ajax/AddStyleSheetCommand.php
EditorDialogSave.php in core/modules/editor/src/Ajax/EditorDialogSave.php
HighlightCommand.php in core/modules/views/src/Ajax/HighlightCommand.php
ReplaceTitleCommand.php in core/modules/views/src/Ajax/ReplaceTitleCommand.php
ScrollTopCommand.php in core/modules/views/src/Ajax/ScrollTopCommand.php

... See full list

File

core/lib/Drupal/Core/Ajax/CommandInterface.php, line 13

Namespace

Drupal\Core\Ajax
View source
interface CommandInterface {

  /**
   * Return an array to be run through json_encode and sent to the client.
   */
  public function render();

}

Members

Contains filters are case sensitive
Namesort descending Modifiers Type Description Overrides
CommandInterface::render public function Return an array to be run through json_encode and sent to the client.