@@ 324-331 (lines=8) @@ | ||
321 | ||
322 | /** @var \samson\activerecord\structurematerial[] $objects Create structure material relations */ |
|
323 | $objects = array(); |
|
324 | if (dbQuery('structurematerial')->cond('MaterialID', $this->MaterialID)->exec($objects)) { |
|
325 | foreach ($objects as $cmsNavigation) { |
|
326 | /** @var \samson\activerecord\Record $copy */ |
|
327 | $copy = $cmsNavigation->copy(); |
|
328 | $copy->MaterialID = $clone->id; |
|
329 | $copy->save(); |
|
330 | } |
|
331 | } |
|
332 | /** @var \samson\activerecord\materialfield[] $objects Create material field relations */ |
|
333 | $objects = array(); |
|
334 | if (dbQuery('materialfield')->cond('MaterialID', $this->MaterialID)->exec($objects)) { |
|
@@ 348-355 (lines=8) @@ | ||
345 | ||
346 | /** @var \samson\activerecord\gallery[] $objects Create gallery field relations */ |
|
347 | $objects = array(); |
|
348 | if (dbQuery('gallery')->cond('MaterialID', $this->MaterialID)->exec($objects)) { |
|
349 | foreach ($objects as $cmsGallery) { |
|
350 | /** @var \samson\activerecord\Record $copy */ |
|
351 | $copy = $cmsGallery->copy(); |
|
352 | $copy->MaterialID = $clone->id; |
|
353 | $copy->save(); |
|
354 | } |
|
355 | } |
|
356 | ||
357 | return $clone; |
|
358 | } |