/** * converts record into raw data for adapter * * @param Tinebase_Record_Abstract $_record * @return array */ protected function _recordToRawData($_record) { $_record->runConvertToData(); $readOnlyFields = $_record->getReadOnlyFields(); $raw = $_record->toArray(FALSE); foreach ($raw as $key => $value) { if ($value instanceof Tinebase_Record_Interface) { $raw[$key] = $value->getId(); } if (in_array($key, $readOnlyFields)) { unset($raw[$key]); } } return $raw; }