Same filename and directory in other branches
- 8.9.x core/lib/Drupal/Core/Ajax/AddCssCommand.php
- 9 core/lib/Drupal/Core/Ajax/AddCssCommand.php
Namespace
Drupal\Core\Ajax
File
core/lib/Drupal/Core/Ajax/AddCssCommand.php
View source
<?php
namespace Drupal\Core\Ajax;
class AddCssCommand implements CommandInterface {
protected $styles;
public function __construct($styles) {
if (is_string($styles)) {
@trigger_error('The ' . __NAMESPACE__ . '\\AddCssCommand with a string argument is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. See http://www.drupal.org/node/3154948', E_USER_DEPRECATED);
}
$this->styles = $styles;
}
public function render() {
return [
'command' => 'add_css',
'data' => $this->styles,
];
}
}
Classes