[11/06/2024] Les premières modifs + installation de quelques modules indispensables
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace OpenApi\Normalizer;
|
||||
|
||||
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
|
||||
|
||||
class ModelApiNormalizer extends ObjectNormalizer
|
||||
{
|
||||
public function normalize($object, $format = null, array $context = [])
|
||||
{
|
||||
$data = parent::normalize($object, $format, $context);
|
||||
|
||||
if (property_exists($object, 'extendedData') && !empty($object->extendedDataValue())) {
|
||||
foreach ($object->extendedDataValue() as $key => $value) {
|
||||
if (isset($data[$key])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$data[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user