// Do not save missing translations
if ((!
isset($valueData['value'
]) ||
$valueData['value'
] === ''
) && !
empty($elementData['required'
])) { continue;
} // Do not save default value
if ($valueData['value'
] ===
$elementData['value'
] && (empty($elementData['scope'
]) ||
$shop->
getId() ==
$defaultShop->
getId())) { continue;
} // Simple data validation
if (!
$this->
validateData($elementData,
$valueData['value'
])) { continue;
} $valueData['value'
] =
$this->
prepareValue($elementData,
$valueData['value'
]);
$value =
new Value();
$value->
setElement($element);
$value->
setShop($shop);
$value->
setValue($valueData['value'
]);
$values[$shop->
getId()] =
$value;
}