protected static function AssetHtmlTagRenderElementTrait::hasRootRelativeUrl in HTTP/2 Server Push 8
Whether the given attribute on the render element has a root-relative URL.
Parameters
array $element: A render element.
string $attribute_name: The name of an attribute.
Return value
bool
2 calls to AssetHtmlTagRenderElementTrait::hasRootRelativeUrl()
- CssCollectionRenderer::render in src/
Asset/ CssCollectionRenderer.php - Renders an asset collection.
- JsCollectionRenderer::render in src/
Asset/ JsCollectionRenderer.php - Renders an asset collection.
File
- src/
Asset/ AssetHtmlTagRenderElementTrait.php, line 64
Class
Namespace
Drupal\http2_server_push\AssetCode
protected static function hasRootRelativeUrl(array $element, $attribute_name) {
$attribute_value = $element['#attributes'][$attribute_name];
return $attribute_value[0] === '/' && $attribute_value[1] !== '/';
}