class HighlightCommand
Same name in other branches
- 9 core/modules/views/src/Ajax/HighlightCommand.php \Drupal\views\Ajax\HighlightCommand
- 8.9.x core/modules/views/src/Ajax/HighlightCommand.php \Drupal\views\Ajax\HighlightCommand
- 11.x 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 \Drupal\Core\Ajax\CommandInterface
Expanded class hierarchy of HighlightCommand
1 file declares its use of HighlightCommand
- ViewsFormBase.php in core/
modules/ views_ui/ src/ Form/ Ajax/ ViewsFormBase.php
File
-
core/
modules/ views/ src/ Ajax/ HighlightCommand.php, line 12
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 [
'command' => 'viewsHighlight',
'selector' => $this->selector,
];
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
HighlightCommand::$selector | protected | property | A CSS selector string. | |
HighlightCommand::render | public | function | Overrides CommandInterface::render | |
HighlightCommand::__construct | public | function | Constructs a \Drupal\views\Ajax\HighlightCommand object. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.