@@ 455-462 (lines=8) @@ | ||
452 | ) { |
|
453 | $result = []; |
|
454 | foreach ($document->getFields() as $field) { |
|
455 | if ($this->getFlatFieldCheckCallback($field, $callback)) { |
|
456 | if ($returnFullField) { |
|
457 | $setValue = $field; |
|
458 | } else { |
|
459 | $setValue = $exposedPrefix . $field->getExposedName(); |
|
460 | } |
|
461 | $result[$documentPrefix . $field->getFieldName()] = $setValue; |
|
462 | } |
|
463 | ||
464 | if ($field instanceof ArrayField) { |
|
465 | if ($this->getFlatFieldCheckCallback($field, $callback)) { |
|
@@ 465-472 (lines=8) @@ | ||
462 | } |
|
463 | ||
464 | if ($field instanceof ArrayField) { |
|
465 | if ($this->getFlatFieldCheckCallback($field, $callback)) { |
|
466 | if ($returnFullField) { |
|
467 | $setValue = $field; |
|
468 | } else { |
|
469 | $setValue = $exposedPrefix . $field->getExposedName() . '.0'; |
|
470 | } |
|
471 | $result[$documentPrefix . $field->getFieldName() . '.0'] = $setValue; |
|
472 | } |
|
473 | } elseif ($field instanceof EmbedOne) { |
|
474 | $result = array_merge( |
|
475 | $result, |
|
@@ 485-492 (lines=8) @@ | ||
482 | ) |
|
483 | ); |
|
484 | } elseif ($field instanceof EmbedMany) { |
|
485 | if ($this->getFlatFieldCheckCallback($field, $callback)) { |
|
486 | if ($returnFullField) { |
|
487 | $setValue = $field; |
|
488 | } else { |
|
489 | $setValue = $exposedPrefix . $field->getExposedName() . '.0'; |
|
490 | } |
|
491 | $result[$documentPrefix . $field->getFieldName() . '.0'] = $setValue; |
|
492 | } |
|
493 | $result = array_merge( |
|
494 | $result, |
|
495 | $this->getFieldNamesFlat( |