/**
* @return CustomFacet|null
*/
public function hydrateFacet(array
$data, array
$streams) { $id =
(int) $data['__customFacet_id'
];
$translation =
$this->
getTranslation($data, '__customFacet',
[],
$id);
$data =
array_merge($data,
$translation);
$customFacet =
new CustomFacet();
$customFacet->
setId($id);
$customFacet->
setUniqueKey($data['__customFacet_unique_key'
]);
$customFacet->
setName($data['__customFacet_name'
]);
$customFacet->
setPosition((int) $data['__customFacet_position'
]);
$translation =
$this->
extractFields('__customFacet_',
$translation);
$facets =
json_decode($data['__customFacet_facet'
], true
);
foreach ($facets as $class => &
$facet) { $facet =
array_merge($facet,
$translation);