class 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

Expanded class hierarchy of DataCommand

4 files declare their use of DataCommand

File

drupal/core/lib/Drupal/Core/Ajax/DataCommand.php, line 21
Definition of Drupal\Core\Ajax\DataCommand.

Namespace

Drupal\Core\Ajax
View source

Members

Namesort descending Modifiers Type Description Overrides
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 atached 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.