| @@ 857-867 (lines=11) @@ | ||
| 854 | } |
|
| 855 | ||
| 856 | // current selection does not specify a mode |
|
| 857 | if ($submodes == null) { |
|
| 858 | if ($field instanceof FieldEntry_Relationship) { |
|
| 859 | $field->expandIncludableElements = false; |
|
| 860 | } |
|
| 861 | $submodes = array_map(function ($fieldIncludableElement) use ($fieldName) { |
|
| 862 | return FieldEntry_relationship::extractMode($fieldName, $fieldIncludableElement); |
|
| 863 | }, $field->fetchIncludableElements()); |
|
| 864 | if ($field instanceof FieldEntry_Relationship) { |
|
| 865 | $field->expandIncludableElements = true; |
|
| 866 | } |
|
| 867 | } |
|
| 868 | ||
| 869 | foreach ($submodes as $submode) { |
|
| 870 | $field->appendFormattedElement($item, $data, $encode, $submode, $eId); |
|
| @@ 162-175 (lines=14) @@ | ||
| 159 | $field->setRecursiveDeepness($deepness); |
|
| 160 | } |
|
| 161 | ||
| 162 | if ($parentIncludableElementMode == null) { |
|
| 163 | if ($field instanceof FieldEntry_Relationship) { |
|
| 164 | $field->expandIncludableElements = false; |
|
| 165 | } |
|
| 166 | $submodes = array_map(function ($fieldIncludableElement) use ($fieldName) { |
|
| 167 | return FieldEntry_relationship::extractMode($fieldName, $fieldIncludableElement); |
|
| 168 | }, $field->fetchIncludableElements()); |
|
| 169 | if ($field instanceof FieldEntry_Relationship) { |
|
| 170 | $field->expandIncludableElements = true; |
|
| 171 | } |
|
| 172 | } |
|
| 173 | else { |
|
| 174 | $submodes = array($parentIncludableElementMode); |
|
| 175 | } |
|
| 176 | ||
| 177 | foreach ($submodes as $submode) { |
|
| 178 | $field->appendFormattedElement($xml, $filteredData, false, $submode, $entryId); |
|