|
@@ 65-67 (lines=3) @@
|
| 62 |
|
if (isset($row['currency']) && isset($row['price']['amount'])) { |
| 63 |
|
$row['price'] = new Money($row['price']['amount'], $row['currency']); |
| 64 |
|
} |
| 65 |
|
if (isset($row['data']) && !is_array($row['data'])) { |
| 66 |
|
$data = Json::decode($row['data']); |
| 67 |
|
} |
| 68 |
|
$row['sums'] = empty($data['sums']) ? [] : $data['sums']; |
| 69 |
|
$row['subprices'] = $data['subprices'] ?? null; |
| 70 |
|
|
|
@@ 98-100 (lines=3) @@
|
| 95 |
|
*/ |
| 96 |
|
public function createEmptyInstance(string $className, array $data = []) |
| 97 |
|
{ |
| 98 |
|
if (isset($data['data']) && !is_array($data['data'])) { |
| 99 |
|
$additionalData = Json::decode($data['data']); |
| 100 |
|
} |
| 101 |
|
|
| 102 |
|
$className = $this->priceFactory->findClassForTypes([ |
| 103 |
|
$additionalData['class'] ?? null, |