public function saveInto(DataObjectInterface $record) { // Check required relation details are available $name = $this->getName(); if (!$name) { return $this; } $value = $this->Value(); foreach (array('Filename', 'Hash', 'Variant') as $part) { $partValue = isset($value[$part]) ? $value[$part] : null; $record->setField("{$name}{$part}", $partValue); } return $this; }