| @@ 325-339 (lines=15) @@ | ||
| 322 | * |
|
| 323 | * @return array |
|
| 324 | */ |
|
| 325 | protected function normalizeFieldsForSave($selectedFields) |
|
| 326 | { |
|
| 327 | $fields = []; |
|
| 328 | if ($this->fields === null) { |
|
| 329 | return []; |
|
| 330 | } |
|
| 331 | ||
| 332 | foreach ($this->fields as $field => $value) { |
|
| 333 | if (!$this->fieldShouldNotBeSaved($field, $value, $selectedFields)) { |
|
| 334 | $fields[$field] = $value; |
|
| 335 | } |
|
| 336 | } |
|
| 337 | ||
| 338 | return $fields; |
|
| 339 | } |
|
| 340 | ||
| 341 | /** |
|
| 342 | * Determine whether the field should be stopped from passing to "update". |
|
| @@ 282-296 (lines=15) @@ | ||
| 279 | * |
|
| 280 | * @return array |
|
| 281 | */ |
|
| 282 | protected function normalizeFieldsForSave($selectedFields) |
|
| 283 | { |
|
| 284 | $fields = []; |
|
| 285 | if ($this->fields === null) { |
|
| 286 | return []; |
|
| 287 | } |
|
| 288 | ||
| 289 | foreach ($this->fields as $field => $value) { |
|
| 290 | if (!$this->fieldShouldNotBeSaved($field, $value, $selectedFields)) { |
|
| 291 | $fields[$field] = $value; |
|
| 292 | } |
|
| 293 | } |
|
| 294 | ||
| 295 | return $fields; |
|
| 296 | } |
|
| 297 | ||
| 298 | /** |
|
| 299 | * Determine whether the field should be stopped from passing to "update". |
|