function CssCommand::setProperty

Same name in other branches
  1. 9 core/lib/Drupal/Core/Ajax/CssCommand.php \Drupal\Core\Ajax\CssCommand::setProperty()
  2. 8.9.x core/lib/Drupal/Core/Ajax/CssCommand.php \Drupal\Core\Ajax\CssCommand::setProperty()
  3. 11.x core/lib/Drupal/Core/Ajax/CssCommand.php \Drupal\Core\Ajax\CssCommand::setProperty()

Adds a property/value pair to the CSS to be added to this element.

Parameters

$property: The CSS property to be changed.

$value: The new value of the CSS property.

Return value

$this

File

core/lib/Drupal/Core/Ajax/CssCommand.php, line 60

Class

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

Namespace

Drupal\Core\Ajax

Code

public function setProperty($property, $value) {
    $this->css[$property] = $value;
    return $this;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.