You are here

public function CssCommand::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 50
Contains \Drupal\Core\Ajax\CssCommand.

Class

CssCommand
An AJAX command for calling the jQuery css() method.

Namespace

Drupal\Core\Ajax

Code

public function __construct($selector, array $css = array()) {
  $this->selector = $selector;
  $this->css = $css;
}