|
@@ 163-170 (lines=8) @@
|
| 160 |
|
|
| 161 |
|
/** @var \samson\activerecord\structurematerial[] $objects Create structure material relations */ |
| 162 |
|
$objects = array(); |
| 163 |
|
if (dbQuery('structurematerial')->cond('MaterialID', $this->MaterialID)->exec($objects)) { |
| 164 |
|
foreach ($objects as $cmsNavigation) { |
| 165 |
|
/** @var \samson\activerecord\Record $copy */ |
| 166 |
|
$copy = $cmsNavigation->copy(); |
| 167 |
|
$copy->MaterialID = $clone->id; |
| 168 |
|
$copy->save(); |
| 169 |
|
} |
| 170 |
|
} |
| 171 |
|
/** @var \samson\activerecord\materialfield[] $objects Create material field relations */ |
| 172 |
|
$objects = array(); |
| 173 |
|
if (dbQuery('materialfield')->cond('MaterialID', $this->MaterialID)->exec($objects)) { |
|
@@ 187-194 (lines=8) @@
|
| 184 |
|
|
| 185 |
|
/** @var \samson\activerecord\gallery[] $objects Create gallery field relations */ |
| 186 |
|
$objects = array(); |
| 187 |
|
if (dbQuery('gallery')->cond('MaterialID', $this->MaterialID)->exec($objects)) { |
| 188 |
|
foreach ($objects as $cmsGallery) { |
| 189 |
|
/** @var \samson\activerecord\Record $copy */ |
| 190 |
|
$copy = $cmsGallery->copy(); |
| 191 |
|
$copy->MaterialID = $clone->id; |
| 192 |
|
$copy->save(); |
| 193 |
|
} |
| 194 |
|
} |
| 195 |
|
|
| 196 |
|
return $clone; |
| 197 |
|
} |