function drupal_http_header_attributes

Same name in other branches
  1. 7.x includes/common.inc \drupal_http_header_attributes()

Formats an attribute string for an HTTP header.

Parameters

array $attributes: An associative array of attributes such as 'rel'.

Return value

string A ; separated string ready for insertion in a HTTP header. No escaping is performed for HTML entities, so this string is not safe to be printed.

Deprecated

in drupal:8.7.0 and is removed from drupal:9.0.0. Use \Drupal\Core\Render\HtmlResponseAttachmentsProcessor::formatHttpHeaderAttributes() instead.

See also

https://www.drupal.org/node/3000051

1 call to drupal_http_header_attributes()
RendererLegacyTest::testHeaderAttributes in core/tests/Drupal/KernelTests/Core/Render/RendererLegacyTest.php
Tests deprecation of the drupal_http_header_attributes() function.

File

core/includes/common.inc, line 378

Code

function drupal_http_header_attributes(array $attributes = []) {
    @trigger_error("drupal_http_header_attributes() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. Use \\Drupal\\Core\\Render\\HtmlResponseAttachmentsProcessor::formatHttpHeaderAttributes() instead. See https://www.drupal.org/node/3000051", E_USER_DEPRECATED);
    return HtmlResponseAttachmentsProcessor::formatHttpHeaderAttributes($attributes);
}

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