|
@@ 375-386 (lines=12) @@
|
| 372 |
|
{ |
| 373 |
|
foreach ($row as $columnName => $columnValue) { |
| 374 |
|
$fieldMethod = $dao->getFieldFromFieldName($columnName); |
| 375 |
|
if (!in_array($columnName, EntitiesGeneratorService::$defaultDateFields) && $fieldMethod |
| 376 |
|
&& (!in_array($columnName, ['id', 'uid'])) && !is_null($columnValue) |
| 377 |
|
) { |
| 378 |
|
// Changing only Name doesn't work properly on Zoho |
| 379 |
|
if ($this->endsWith($columnName, '_OwnerName') || $this->endsWith($columnName, '_Name')) { |
| 380 |
|
continue; |
| 381 |
|
} |
| 382 |
|
$type = $fieldMethod->getType(); |
| 383 |
|
$value = $this->formatValueToBeans($type, $columnValue); |
| 384 |
|
$setterMethod = $fieldMethod->getSetter(); |
| 385 |
|
$zohoBean->{$setterMethod}($value); |
| 386 |
|
} |
| 387 |
|
} |
| 388 |
|
} |
| 389 |
|
|
|
@@ 401-412 (lines=12) @@
|
| 398 |
|
private function updateDataZohoBean(AbstractZohoDao $dao, ZohoBeanInterface $zohoBean, $columnName, $valueDb) |
| 399 |
|
{ |
| 400 |
|
$fieldMethod = $dao->getFieldFromFieldName($columnName); |
| 401 |
|
if (!in_array($columnName, EntitiesGeneratorService::$defaultDateFields) && $fieldMethod |
| 402 |
|
&& !in_array($columnName, ['id', 'uid']) |
| 403 |
|
) { |
| 404 |
|
// Changing only Name doesn't work properly on Zoho |
| 405 |
|
if ($this->endsWith($columnName, '_OwnerName') || $this->endsWith($columnName, '_Name')) { |
| 406 |
|
return; |
| 407 |
|
} |
| 408 |
|
$type = $fieldMethod->getType(); |
| 409 |
|
$value = is_null($valueDb) ? $valueDb : $this->formatValueToBeans($type, $valueDb); |
| 410 |
|
$setterMethod = $fieldMethod->getSetter(); |
| 411 |
|
$zohoBean->{$setterMethod}($value); |
| 412 |
|
} |
| 413 |
|
} |
| 414 |
|
|
| 415 |
|
/** |