class InvokeCommand

AJAX command for invoking an arbitrary jQuery method.

The 'invoke' command will instruct the client to invoke the given jQuery method with the supplied arguments on the elements matched by the given selector. Intended for simple jQuery commands, such as attr(), addClass(), removeClass(), toggleClass(), etc.

This command is implemented by Drupal.AjaxCommands.prototype.invoke() defined in misc/ajax.js.

Hierarchy

Related topics

Ajax API
Overview for Drupal's Ajax API.

File

core/lib/Drupal/Core/Ajax/InvokeCommand.php, line 18

Namespace

Drupal\Core\Ajax

Members

Name Modifiers Type Description
InvokeCommand::$arguments protected property An optional list of arguments to pass to the method.
InvokeCommand::$method protected property A jQuery method to invoke.
InvokeCommand::$selector protected property A CSS selector string.
InvokeCommand::render public function Implements Drupal\Core\Ajax\CommandInterface:render(). Overrides CommandInterface::render
InvokeCommand::__construct public function Constructs an InvokeCommand object.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Ajax!InvokeCommand.php/class/InvokeCommand/8.1.x