@@ 1472-1489 (lines=18) @@ | ||
1469 | public function countSCategories(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) |
|
1470 | { |
|
1471 | $partial = $this->collSCategoriesPartial && !$this->isNew(); |
|
1472 | if (null === $this->collSCategories || null !== $criteria || $partial) { |
|
1473 | if ($this->isNew() && null === $this->collSCategories) { |
|
1474 | return 0; |
|
1475 | } |
|
1476 | ||
1477 | if ($partial && !$criteria) { |
|
1478 | return count($this->getSCategories()); |
|
1479 | } |
|
1480 | ||
1481 | $query = SCategoryQuery::create(null, $criteria); |
|
1482 | if ($distinct) { |
|
1483 | $query->distinct(); |
|
1484 | } |
|
1485 | ||
1486 | return $query |
|
1487 | ->filterByRoute($this) |
|
1488 | ->count($con); |
|
1489 | } |
|
1490 | ||
1491 | return count($this->collSCategories); |
|
1492 | } |
|
@@ 1722-1739 (lines=18) @@ | ||
1719 | public function countSProductss(Criteria $criteria = null, $distinct = false, ConnectionInterface $con = null) |
|
1720 | { |
|
1721 | $partial = $this->collSProductssPartial && !$this->isNew(); |
|
1722 | if (null === $this->collSProductss || null !== $criteria || $partial) { |
|
1723 | if ($this->isNew() && null === $this->collSProductss) { |
|
1724 | return 0; |
|
1725 | } |
|
1726 | ||
1727 | if ($partial && !$criteria) { |
|
1728 | return count($this->getSProductss()); |
|
1729 | } |
|
1730 | ||
1731 | $query = SProductsQuery::create(null, $criteria); |
|
1732 | if ($distinct) { |
|
1733 | $query->distinct(); |
|
1734 | } |
|
1735 | ||
1736 | return $query |
|
1737 | ->filterByRoute($this) |
|
1738 | ->count($con); |
|
1739 | } |
|
1740 | ||
1741 | return count($this->collSProductss); |
|
1742 | } |