Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. CommandInterface.php

interface CommandInterface

AJAX command interface.

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

Hierarchy

  • interface \Drupal\Core\Ajax\CommandInterface

Expanded class hierarchy of CommandInterface

All classes that implement CommandInterface

Related topics

Ajax API
Overview for Drupal's Ajax API.
8 files declare their use of CommandInterface
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
SetFormCommand.php in core/modules/views_ui/src/Ajax/SetFormCommand.php
SetSubtreesCommand.php in core/modules/toolbar/src/Ajax/SetSubtreesCommand.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

Title Sort descending Modifiers Object type Summary Overrides
CommandInterface::render public function Return an array to be run through json_encode and sent to the client. 31
RSS feed
Powered by Drupal