public function setValue($value, $record = null, $markChanged = true) { parent::setValue($value, $record, $markChanged); if ($record instanceof DataObject) { $this->record = $record; } }