DataCommand

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.

Hierarchy

Related topics

Ajax API
Overview for Drupal's Ajax API.

File

core/lib/Drupal/Core/Ajax/DataCommand.php, line 16

Namespace

Drupal\Core\Ajax

Members

Name Modifiers Type Description
DataCommand::$name protected property The key of the data attached to elements matched by the selector.
DataCommand::$selector protected property A CSS selector string for elements to which data will be attached.
DataCommand::$value protected property The value of the data to be attached to elements matched by the selector.
DataCommand::render public function Implements Drupal\Core\Ajax\CommandInterface:render(). Overrides CommandInterface::render
DataCommand::__construct public function Constructs a DataCommand object.
doc_Drupal
2016-10-29 09:00:01
Comments
Leave a Comment

Please login to continue.