class HighlightCommand in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Ajax/HighlightCommand.php \Drupal\views\Ajax\HighlightCommand
Provides an AJAX command for highlighting a certain new piece of html.
This command is implemented in Drupal.AjaxCommands.prototype.viewsHighlight.
Hierarchy
- class \Drupal\views\Ajax\HighlightCommand implements CommandInterface
Expanded class hierarchy of HighlightCommand
File
- core/
modules/ views/ src/ Ajax/ HighlightCommand.php, line 17 - Contains \Drupal\views\Ajax\HighlightCommand.
Namespace
Drupal\views\AjaxView source
class HighlightCommand implements CommandInterface {
/**
* A CSS selector string.
*
* @var string
*/
protected $selector;
/**
* Constructs a \Drupal\views\Ajax\HighlightCommand object.
*
* @param string $selector
* A CSS selector.
*/
public function __construct($selector) {
$this->selector = $selector;
}
/**
* {@inheritdoc}
*/
public function render() {
return array(
'command' => 'viewsHighlight',
'selector' => $this->selector,
);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
HighlightCommand:: |
protected | property | A CSS selector string. | |
HighlightCommand:: |
public | function |
Return an array to be run through json_encode and sent to the client. Overrides CommandInterface:: |
|
HighlightCommand:: |
public | function | Constructs a \Drupal\views\Ajax\HighlightCommand object. |