
| Current Path : /var/www/html1/testsite/web/modules/contrib/metatag/src/Normalizer/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : //var/www/html1/testsite/web/modules/contrib/metatag/src/Normalizer/MetatagHalNormalizer.php |
<?php
namespace Drupal\metatag\Normalizer;
/**
* Converts the Metatag field item object structure to Metatag array structure.
*/
class MetatagHalNormalizer extends MetatagNormalizer {
/**
* {@inheritdoc}
*/
protected $format = ['hal_json'];
/**
* {@inheritdoc}
*/
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],
];
}
}