You are here

protected function BaseContext::getMetaTagRenderArray in Acquia Lift Connector 8.3

Same name and namespace in other branches
  1. 8.4 src/Service/Context/BaseContext.php \Drupal\acquia_lift\Service\Context\BaseContext::getMetaTagRenderArray()

Get the render array for a single meta tag.

Parameters

string $name: The name for the meta tag

string $content: The content for the meta tag

Return value

array The render array

1 call to BaseContext::getMetaTagRenderArray()
BaseContext::populateHtmlHead in src/Service/Context/BaseContext.php
Populate page's HTML head.

File

src/Service/Context/BaseContext.php, line 31

Class

BaseContext

Namespace

Drupal\acquia_lift\Service\Context

Code

protected function getMetaTagRenderArray($name, $content) {
  return [
    '#type' => 'html_tag',
    '#tag' => 'meta',
    '#attributes' => [
      'itemprop' => 'acquia_lift:' . $name,
      'content' => $content,
    ],
  ];
}