| Conditions | 5 |
| Paths | 6 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 15 | public function createValue(array $fieldValueArray, array $context = array()) |
||
| 16 | { |
||
| 17 | if (count($fieldValueArray) == 1 && isset($fieldValueArray['destinationContentIds'])) { |
||
| 18 | // fromHash format |
||
| 19 | $ids = $fieldValueArray['destinationContentIds']; |
||
| 20 | } else { |
||
| 21 | // simplified format |
||
| 22 | $ids = $fieldValueArray; |
||
| 23 | } |
||
| 24 | |||
| 25 | foreach ($ids as $key => $id) { |
||
| 26 | if ($this->referenceResolver->isReference($id)) { |
||
| 27 | $ids[$key] = $this->referenceResolver->getReferenceValue($id); |
||
| 28 | } |
||
| 29 | } |
||
| 30 | |||
| 31 | return new Value($ids); |
||
| 32 | } |
||
| 33 | } |
||
| 34 |