if (!
is_writable($esdDir)) { throw new RuntimeException(sprintf('Unable to save ESD-file, as the directory "%s" is not writable.',
$esdDir));
} copy($file,
$saveFile);
@
unlink($file);
$data['esd'
]['file'
] =
$saveFileName;
} if (isset($data['esd'
]['serials'
])) { $data =
$this->
prepareEsdSerialsAssociation($data,
$esd);
} $esd->
fromArray($data['esd'
]);
$variant->
setEsd($esd);
} elseif ($data['esd'
] === null
) { $variant->
setEsd(null
);
} unset($data['esd'
]);
return $data;
}