Code Duplication    Length = 43-43 lines in 4 locations

application/modules/xbanners/models/Base/BannerImage.php 1 location

@@ 1708-1750 (lines=43) @@
1705
     * @return ObjectCollection|ChildBannerImageI18n[] List of ChildBannerImageI18n objects
1706
     * @throws PropelException
1707
     */
1708
    public function getBannerImageI18ns(Criteria $criteria = null, ConnectionInterface $con = null)
1709
    {
1710
        $partial = $this->collBannerImageI18nsPartial && !$this->isNew();
1711
        if (null === $this->collBannerImageI18ns || null !== $criteria  || $partial) {
1712
            if ($this->isNew() && null === $this->collBannerImageI18ns) {
1713
                // return empty collection
1714
                $this->initBannerImageI18ns();
1715
            } else {
1716
                $collBannerImageI18ns = ChildBannerImageI18nQuery::create(null, $criteria)
1717
                    ->filterByBannerImage($this)
1718
                    ->find($con);
1719
1720
                if (null !== $criteria) {
1721
                    if (false !== $this->collBannerImageI18nsPartial && count($collBannerImageI18ns)) {
1722
                        $this->initBannerImageI18ns(false);
1723
1724
                        foreach ($collBannerImageI18ns as $obj) {
1725
                            if (false == $this->collBannerImageI18ns->contains($obj)) {
1726
                                $this->collBannerImageI18ns->append($obj);
1727
                            }
1728
                        }
1729
1730
                        $this->collBannerImageI18nsPartial = true;
1731
                    }
1732
1733
                    return $collBannerImageI18ns;
1734
                }
1735
1736
                if ($partial && $this->collBannerImageI18ns) {
1737
                    foreach ($this->collBannerImageI18ns as $obj) {
1738
                        if ($obj->isNew()) {
1739
                            $collBannerImageI18ns[] = $obj;
1740
                        }
1741
                    }
1742
                }
1743
1744
                $this->collBannerImageI18ns = $collBannerImageI18ns;
1745
                $this->collBannerImageI18nsPartial = false;
1746
            }
1747
        }
1748
1749
        return $this->collBannerImageI18ns;
1750
    }
1751
1752
    /**
1753
     * Sets a collection of ChildBannerImageI18n objects related by a one-to-many relationship

application/modules/xbanners/models/Base/Banners.php 2 locations

@@ 1433-1475 (lines=43) @@
1430
     * @return ObjectCollection|ChildBannerImage[] List of ChildBannerImage objects
1431
     * @throws PropelException
1432
     */
1433
    public function getBannerImages(Criteria $criteria = null, ConnectionInterface $con = null)
1434
    {
1435
        $partial = $this->collBannerImagesPartial && !$this->isNew();
1436
        if (null === $this->collBannerImages || null !== $criteria  || $partial) {
1437
            if ($this->isNew() && null === $this->collBannerImages) {
1438
                // return empty collection
1439
                $this->initBannerImages();
1440
            } else {
1441
                $collBannerImages = ChildBannerImageQuery::create(null, $criteria)
1442
                    ->filterByBanners($this)
1443
                    ->find($con);
1444
1445
                if (null !== $criteria) {
1446
                    if (false !== $this->collBannerImagesPartial && count($collBannerImages)) {
1447
                        $this->initBannerImages(false);
1448
1449
                        foreach ($collBannerImages as $obj) {
1450
                            if (false == $this->collBannerImages->contains($obj)) {
1451
                                $this->collBannerImages->append($obj);
1452
                            }
1453
                        }
1454
1455
                        $this->collBannerImagesPartial = true;
1456
                    }
1457
1458
                    return $collBannerImages;
1459
                }
1460
1461
                if ($partial && $this->collBannerImages) {
1462
                    foreach ($this->collBannerImages as $obj) {
1463
                        if ($obj->isNew()) {
1464
                            $collBannerImages[] = $obj;
1465
                        }
1466
                    }
1467
                }
1468
1469
                $this->collBannerImages = $collBannerImages;
1470
                $this->collBannerImagesPartial = false;
1471
            }
1472
        }
1473
1474
        return $this->collBannerImages;
1475
    }
1476
1477
    /**
1478
     * Sets a collection of ChildBannerImage objects related by a one-to-many relationship
@@ 1658-1700 (lines=43) @@
1655
     * @return ObjectCollection|ChildBannersI18n[] List of ChildBannersI18n objects
1656
     * @throws PropelException
1657
     */
1658
    public function getBannersI18ns(Criteria $criteria = null, ConnectionInterface $con = null)
1659
    {
1660
        $partial = $this->collBannersI18nsPartial && !$this->isNew();
1661
        if (null === $this->collBannersI18ns || null !== $criteria  || $partial) {
1662
            if ($this->isNew() && null === $this->collBannersI18ns) {
1663
                // return empty collection
1664
                $this->initBannersI18ns();
1665
            } else {
1666
                $collBannersI18ns = ChildBannersI18nQuery::create(null, $criteria)
1667
                    ->filterByBanners($this)
1668
                    ->find($con);
1669
1670
                if (null !== $criteria) {
1671
                    if (false !== $this->collBannersI18nsPartial && count($collBannersI18ns)) {
1672
                        $this->initBannersI18ns(false);
1673
1674
                        foreach ($collBannersI18ns as $obj) {
1675
                            if (false == $this->collBannersI18ns->contains($obj)) {
1676
                                $this->collBannersI18ns->append($obj);
1677
                            }
1678
                        }
1679
1680
                        $this->collBannersI18nsPartial = true;
1681
                    }
1682
1683
                    return $collBannersI18ns;
1684
                }
1685
1686
                if ($partial && $this->collBannersI18ns) {
1687
                    foreach ($this->collBannersI18ns as $obj) {
1688
                        if ($obj->isNew()) {
1689
                            $collBannersI18ns[] = $obj;
1690
                        }
1691
                    }
1692
                }
1693
1694
                $this->collBannersI18ns = $collBannersI18ns;
1695
                $this->collBannersI18nsPartial = false;
1696
            }
1697
        }
1698
1699
        return $this->collBannersI18ns;
1700
    }
1701
1702
    /**
1703
     * Sets a collection of ChildBannersI18n objects related by a one-to-many relationship

application/modules/mod_link/models/Base/PageLink.php 1 location

@@ 1397-1439 (lines=43) @@
1394
     * @return ObjectCollection|ChildPageLinkProduct[] List of ChildPageLinkProduct objects
1395
     * @throws PropelException
1396
     */
1397
    public function getPageLinkProducts(Criteria $criteria = null, ConnectionInterface $con = null)
1398
    {
1399
        $partial = $this->collPageLinkProductsPartial && !$this->isNew();
1400
        if (null === $this->collPageLinkProducts || null !== $criteria  || $partial) {
1401
            if ($this->isNew() && null === $this->collPageLinkProducts) {
1402
                // return empty collection
1403
                $this->initPageLinkProducts();
1404
            } else {
1405
                $collPageLinkProducts = ChildPageLinkProductQuery::create(null, $criteria)
1406
                    ->filterByPageLink($this)
1407
                    ->find($con);
1408
1409
                if (null !== $criteria) {
1410
                    if (false !== $this->collPageLinkProductsPartial && count($collPageLinkProducts)) {
1411
                        $this->initPageLinkProducts(false);
1412
1413
                        foreach ($collPageLinkProducts as $obj) {
1414
                            if (false == $this->collPageLinkProducts->contains($obj)) {
1415
                                $this->collPageLinkProducts->append($obj);
1416
                            }
1417
                        }
1418
1419
                        $this->collPageLinkProductsPartial = true;
1420
                    }
1421
1422
                    return $collPageLinkProducts;
1423
                }
1424
1425
                if ($partial && $this->collPageLinkProducts) {
1426
                    foreach ($this->collPageLinkProducts as $obj) {
1427
                        if ($obj->isNew()) {
1428
                            $collPageLinkProducts[] = $obj;
1429
                        }
1430
                    }
1431
                }
1432
1433
                $this->collPageLinkProducts = $collPageLinkProducts;
1434
                $this->collPageLinkProductsPartial = false;
1435
            }
1436
        }
1437
1438
        return $this->collPageLinkProducts;
1439
    }
1440
1441
    /**
1442
     * Sets a collection of ChildPageLinkProduct objects related by a one-to-many relationship