Drupal 8  8.0.2
DataCommand Class Reference
Inheritance diagram for DataCommand:

Public Member Functions

 __construct ($selector, $name, $value)
 
 render ()
 
- Public Member Functions inherited from CommandInterface
 render ()
 
 __construct ($selector)
 
 render ()
 

Protected Attributes

 $selector
 
 $name
 
 $value
 
- Protected Attributes inherited from CommandInterface
 $selector
 

Detailed Description

An AJAX command for implementing jQuery's data() method.

This instructs the client to attach the name=value pair of data to the selector via jQuery's data cache.

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

Constructor & Destructor Documentation

__construct (   $selector,
  $name,
  $value 
)

Constructs a DataCommand object.

Parameters
string$selectorA CSS selector for the elements to which the data will be attached.
string$nameThe key of the data to be attached to elements matched by the selector.
type$valueThe value of the data to be attached to elements matched by the selector.

Member Function Documentation

render ( )

Implements Drupal:render().


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