selector = $selector; $this->css = $css; } /** * Adds a property/value pair to the CSS to be added to this element. * * @param $property * The CSS property to be changed. * @param $value * The new value of the CSS property. * * @return $this */ public function setProperty($property, $value) { $this->css[$property] = $value; return $this; } /** * Implements Drupal\Core\Ajax\CommandInterface:render(). */ public function render() { return [ 'command' => 'css', 'selector' => $this->selector, 'argument' => $this->css, ]; } }