You are here

protected static function AssetHtmlTagRenderElementTrait::isLinkRelStylesheet in HTTP/2 Server Push 8

Whether the render element is a <link rel=stylesheet>.

Parameters

array $element: A render element.

Return value

bool

1 call to AssetHtmlTagRenderElementTrait::isLinkRelStylesheet()
CssCollectionRenderer::render in src/Asset/CssCollectionRenderer.php
Renders an asset collection.

File

src/Asset/AssetHtmlTagRenderElementTrait.php, line 15

Class

AssetHtmlTagRenderElementTrait

Namespace

Drupal\http2_server_push\Asset

Code

protected static function isLinkRelStylesheet(array $element) {
  return isset($element['#type']) && $element['#type'] === 'html_tag' && (isset($element['#tag']) && $element['#tag'] === 'link') && (isset($element['#attributes']) && isset($element['#attributes']['rel']) && $element['#attributes']['rel'] === 'stylesheet');
}