function CssCommand::__construct
Same name in other branches
- 9 core/lib/Drupal/Core/Ajax/CssCommand.php \Drupal\Core\Ajax\CssCommand::__construct()
- 10 core/lib/Drupal/Core/Ajax/CssCommand.php \Drupal\Core\Ajax\CssCommand::__construct()
- 11.x core/lib/Drupal/Core/Ajax/CssCommand.php \Drupal\Core\Ajax\CssCommand::__construct()
Constructs a CssCommand object.
Parameters
string $selector: A CSS selector for elements to which the CSS will be applied.
array $css: An array of CSS property/value pairs to set.
File
-
core/
lib/ Drupal/ Core/ Ajax/ CssCommand.php, line 45
Class
- CssCommand
- An AJAX command for calling the jQuery css() method.
Namespace
Drupal\Core\AjaxCode
public function __construct($selector, array $css = []) {
$this->selector = $selector;
$this->css = $css;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.