Drupal 8  8.0.2
InvokeCommand Class Reference
Inheritance diagram for InvokeCommand:

Public Member Functions

 __construct ($selector, $method, array $arguments=array())
 
 render ()
 
- Public Member Functions inherited from CommandInterface
 render ()
 
 __construct ($selector)
 
 render ()
 

Protected Attributes

 $selector
 
 $method
 
 $arguments
 
- Protected Attributes inherited from CommandInterface
 $selector
 

Detailed Description

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.

Constructor & Destructor Documentation

__construct (   $selector,
  $method,
array  $arguments = array() 
)

Constructs an InvokeCommand object.

Parameters
string$selectorA jQuery selector.
string$methodThe name of a jQuery method to invoke.
array$argumentsAn optional array of arguments to pass to the method.

Member Function Documentation

render ( )

Implements Drupal:render().


The documentation for this class was generated from the following file: