* A string that contains the styles to be added to the page.
* Arrays containing attributes of the stylesheets to be added to the page.
*
* It should include the wrapping style tag.
*
* @var string
* @var string[][]|string
*/
protected$styles;
/**
* Constructs an AddCssCommand.
*
* @param string $styles
* A string that contains the styles to be added to the page, including the
* wrapping <style> tag.
* @param string[][]|string $styles
* Arrays containing attributes of the stylesheets to be added to the page.
* i.e. `['href' => 'someURL']` becomes `<link href="someURL">`.
*/
publicfunction__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);
* {@link Drupal.Ajax} object created by {@link Drupal.ajax}.
* @param {object} response
* The response from the Ajax request.
* @param {string} response.data
* A string that contains the styles to be added.
* @param {object[]|string} response.data
* An array of styles to be added.
* @param {number} [status]
* The XMLHttpRequest status.
*/
add_css(ajax,response,status){
if (typeofresponse.data==='string'){
Drupal.deprecationError({
message:
'Passing a string to the Drupal.ajax.add_css() method is deprecated in 10.1.0 and is removed from drupal:11.0.0. See https://www.drupal.org/node/3154948.',