|
@@ 137-145 (lines=9) @@
|
| 134 |
|
$fieldModel = new FieldModel(); |
| 135 |
|
$fieldTranslations = new EloquentCollection(); |
| 136 |
|
|
| 137 |
|
if (isset($assignment['field']['translations'])) { |
| 138 |
|
foreach (array_pull($assignment['field'], 'translations') as $attributes) { |
| 139 |
|
|
| 140 |
|
$translation = new FieldModelTranslation(); |
| 141 |
|
$translation->setRawAttributes($attributes); |
| 142 |
|
|
| 143 |
|
$fieldTranslations->push($translation); |
| 144 |
|
} |
| 145 |
|
} |
| 146 |
|
|
| 147 |
|
$assignment['field']['config'] = serialize($assignment['field']['config']); |
| 148 |
|
|
|
@@ 158-166 (lines=9) @@
|
| 155 |
|
$assignmentModel = new AssignmentModel(); |
| 156 |
|
$assignmentTranslations = new EloquentCollection(); |
| 157 |
|
|
| 158 |
|
if (isset($assignment['translations'])) { |
| 159 |
|
foreach (array_pull($assignment, 'translations') as $attributes) { |
| 160 |
|
|
| 161 |
|
$translation = new AssignmentModelTranslation(); |
| 162 |
|
$translation->setRawAttributes($attributes); |
| 163 |
|
|
| 164 |
|
$assignmentTranslations->push($translation); |
| 165 |
|
} |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
$assignmentModel->setRawAttributes($assignment); |
| 169 |
|
$assignmentModel->setRawAttributes($assignment); |