/**
* {@inheritdoc}
*
* @param BasePageDocument $object
*/
public function setValues($object, $locale, array $data)
{
$propertyAccess = PropertyAccess::createPropertyAccessorBuilder()->enableMagicCall()->getPropertyAccessor();
$structure = $object->getStructure();
foreach ($data as $property => $value) {
try {
$propertyAccess->setValue($structure, $property, $value);
} catch (\InvalidArgumentException $e) {
//ignore not existing properties
}
}
}