|
@@ 330-337 (lines=8) @@
|
| 327 |
|
|
| 328 |
|
/** @var \samson\activerecord\structurematerial[] $objects Create structure material relations */ |
| 329 |
|
$objects = array(); |
| 330 |
|
if (dbQuery('structurematerial')->cond('MaterialID', $this->MaterialID)->exec($objects)) { |
| 331 |
|
foreach ($objects as $cmsNavigation) { |
| 332 |
|
/** @var \samson\activerecord\Record $copy */ |
| 333 |
|
$copy = $cmsNavigation->copy(); |
| 334 |
|
$copy->MaterialID = $clone->id; |
| 335 |
|
$copy->save(); |
| 336 |
|
} |
| 337 |
|
} |
| 338 |
|
/** @var \samson\activerecord\materialfield[] $objects Create material field relations */ |
| 339 |
|
$objects = array(); |
| 340 |
|
if (dbQuery('materialfield')->cond('MaterialID', $this->MaterialID)->exec($objects)) { |
|
@@ 354-361 (lines=8) @@
|
| 351 |
|
|
| 352 |
|
/** @var \samson\activerecord\gallery[] $objects Create gallery field relations */ |
| 353 |
|
$objects = array(); |
| 354 |
|
if (dbQuery('gallery')->cond('MaterialID', $this->MaterialID)->exec($objects)) { |
| 355 |
|
foreach ($objects as $cmsGallery) { |
| 356 |
|
/** @var \samson\activerecord\Record $copy */ |
| 357 |
|
$copy = $cmsGallery->copy(); |
| 358 |
|
$copy->MaterialID = $clone->id; |
| 359 |
|
$copy->save(); |
| 360 |
|
} |
| 361 |
|
} |
| 362 |
|
|
| 363 |
|
return $clone; |
| 364 |
|
} |