Require array argument to AddCssCommand
1 unresolved thread
1 unresolved thread
Closes #3339374
Merge request reports
Activity
21 21 */ 22 22 protected $styles; 23 23 24 24 /** 25 25 * Constructs an AddCssCommand. 26 26 * 27 * @param string[][]|string $styles 27 * @param string[][] $styles 28 28 * Arrays containing attributes of the stylesheets to be added to the page. 29 29 * i.e. `['href' => 'someURL']` becomes `<link href="someURL">`. 30 30 */ 31 public function __construct($styles) { 32 if (is_string($styles)) { 33 @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); 34 } 31 public function __construct(array $styles) {
Please register or sign in to reply