public function resetFallback($strField)
{
$metaModel = $this->getMetaModel();
$attribute = $metaModel->getAttribute($strField);
$ids = $metaModel->getIdsFromFilter(null);
if ($attribute instanceof IComplex) {
$attribute->unsetDataFor($ids);
}
if ($attribute instanceof ITranslated) {
$attribute->unsetValueFor($ids, $this->getCurrentLanguage());
}
if ($attribute instanceof IAttribute) {
$data = array();
foreach ($ids as $id) {
$data[$id] = null;
}
$attribute->setDataFor($data);
}
throw new \RuntimeException('Unknown attribute or type ' . $strField);
}