|
@@ 1437-1458 (lines=22) @@
|
| 1434 |
|
* @param ConnectionInterface $con Optional connection object |
| 1435 |
|
* @return $this|ChildRoute The current object (for fluent API support) |
| 1436 |
|
*/ |
| 1437 |
|
public function setSCategories(Collection $sCategories, ConnectionInterface $con = null) |
| 1438 |
|
{ |
| 1439 |
|
/** @var SCategory[] $sCategoriesToDelete */ |
| 1440 |
|
$sCategoriesToDelete = $this->getSCategories(new Criteria(), $con)->diff($sCategories); |
| 1441 |
|
|
| 1442 |
|
|
| 1443 |
|
$this->sCategoriesScheduledForDeletion = $sCategoriesToDelete; |
| 1444 |
|
|
| 1445 |
|
foreach ($sCategoriesToDelete as $sCategoryRemoved) { |
| 1446 |
|
$sCategoryRemoved->setRoute(null); |
| 1447 |
|
} |
| 1448 |
|
|
| 1449 |
|
$this->collSCategories = null; |
| 1450 |
|
foreach ($sCategories as $sCategory) { |
| 1451 |
|
$this->addSCategory($sCategory); |
| 1452 |
|
} |
| 1453 |
|
|
| 1454 |
|
$this->collSCategories = $sCategories; |
| 1455 |
|
$this->collSCategoriesPartial = false; |
| 1456 |
|
|
| 1457 |
|
return $this; |
| 1458 |
|
} |
| 1459 |
|
|
| 1460 |
|
/** |
| 1461 |
|
* Returns the number of related BaseSCategory objects. |
|
@@ 1687-1708 (lines=22) @@
|
| 1684 |
|
* @param ConnectionInterface $con Optional connection object |
| 1685 |
|
* @return $this|ChildRoute The current object (for fluent API support) |
| 1686 |
|
*/ |
| 1687 |
|
public function setSProductss(Collection $sProductss, ConnectionInterface $con = null) |
| 1688 |
|
{ |
| 1689 |
|
/** @var SProducts[] $sProductssToDelete */ |
| 1690 |
|
$sProductssToDelete = $this->getSProductss(new Criteria(), $con)->diff($sProductss); |
| 1691 |
|
|
| 1692 |
|
|
| 1693 |
|
$this->sProductssScheduledForDeletion = $sProductssToDelete; |
| 1694 |
|
|
| 1695 |
|
foreach ($sProductssToDelete as $sProductsRemoved) { |
| 1696 |
|
$sProductsRemoved->setRoute(null); |
| 1697 |
|
} |
| 1698 |
|
|
| 1699 |
|
$this->collSProductss = null; |
| 1700 |
|
foreach ($sProductss as $sProducts) { |
| 1701 |
|
$this->addSProducts($sProducts); |
| 1702 |
|
} |
| 1703 |
|
|
| 1704 |
|
$this->collSProductss = $sProductss; |
| 1705 |
|
$this->collSProductssPartial = false; |
| 1706 |
|
|
| 1707 |
|
return $this; |
| 1708 |
|
} |
| 1709 |
|
|
| 1710 |
|
/** |
| 1711 |
|
* Returns the number of related BaseSProducts objects. |