You are here

public function MetatagHalNormalizer::normalize in Metatag 8

Overrides MetatagNormalizer::normalize

File

src/Normalizer/MetatagHalNormalizer.php, line 18

Class

MetatagHalNormalizer
Converts the Metatag field item object structure to Metatag array structure.

Namespace

Drupal\metatag\Normalizer

Code

public function normalize($field_item, $format = NULL, array $context = []) {
  $normalized = parent::normalize($field_item, $format, $context);

  // Mock the field array similar to the other fields.
  return [
    'metatag' => [
      $normalized,
    ],
  ];
}