|
@@ 132-140 (lines=9) @@
|
| 129 |
|
$fieldModel = new FieldModel(); |
| 130 |
|
$fieldTranslations = new EloquentCollection(); |
| 131 |
|
|
| 132 |
|
if (isset($assignment['field']['translations'])) { |
| 133 |
|
foreach (array_pull($assignment['field'], 'translations') as $attributes) { |
| 134 |
|
$translation = new FieldModelTranslation(); |
| 135 |
|
$translation->setRawAttributes($attributes); |
| 136 |
|
|
| 137 |
|
$fieldTranslations->push($translation); |
| 138 |
|
} |
| 139 |
|
} |
| 140 |
|
|
| 141 |
|
$assignment['field']['config'] = serialize($assignment['field']['config']); |
| 142 |
|
|
| 143 |
|
$fieldModel->setRawAttributes($assignment['field']); |
|
@@ 152-160 (lines=9) @@
|
| 149 |
|
$assignmentModel = new AssignmentModel(); |
| 150 |
|
$assignmentTranslations = new EloquentCollection(); |
| 151 |
|
|
| 152 |
|
if (isset($assignment['translations'])) { |
| 153 |
|
foreach (array_pull($assignment, 'translations') as $attributes) { |
| 154 |
|
$translation = new AssignmentModelTranslation(); |
| 155 |
|
$translation->setRawAttributes($attributes); |
| 156 |
|
|
| 157 |
|
$assignmentTranslations->push($translation); |
| 158 |
|
} |
| 159 |
|
} |
| 160 |
|
|
| 161 |
|
$assignmentModel->setRawAttributes($assignment); |
| 162 |
|
$assignmentModel->setRawAttributes($assignment); |
| 163 |
|
|