interface 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

24 files declare their use of CommandInterface
AddCssCommand.php in drupal/core/lib/Drupal/Core/Ajax/AddCssCommand.php
Definition of Drupal\Core\Ajax\AddCssCommand.
AlertCommand.php in drupal/core/lib/Drupal/Core/Ajax/AlertCommand.php
Definition of Drupal\Core\Ajax\AlertCommand.
BaseCommand.php in drupal/core/modules/edit/lib/Drupal/edit/Ajax/BaseCommand.php
Contains \Drupal\edit\Ajax\BaseCommand.
ChangedCommand.php in drupal/core/lib/Drupal/Core/Ajax/ChangedCommand.php
Definition of Drupal\Core\Ajax\ChangedCommand.
CssCommand.php in drupal/core/lib/Drupal/Core/Ajax/CssCommand.php
Definition of Drupal\Core\Ajax\CssCommand.

... See full list

File

drupal/core/lib/Drupal/Core/Ajax/CommandInterface.php, line 16
Definition of Drupal\Core\Ajax\CommandInterface.

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

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