public function CssCommand::__construct

public CssCommand::__construct($selector, array $css = array())

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\Ajax

Code

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Ajax!CssCommand.php/function/CssCommand::__construct/8.1.x