Code Duplication    Length = 21-21 lines in 7 locations

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

@@ 860-880 (lines=21) @@
857
     * @see BannerImage::setDeleted()
858
     * @see BannerImage::isDeleted()
859
     */
860
    public function delete(ConnectionInterface $con = null)
861
    {
862
        if ($this->isDeleted()) {
863
            throw new PropelException("This object has already been deleted.");
864
        }
865
866
        if ($con === null) {
867
            $con = Propel::getServiceContainer()->getWriteConnection(BannerImageTableMap::DATABASE_NAME);
868
        }
869
870
        $con->transaction(function () use ($con) {
871
            $deleteQuery = ChildBannerImageQuery::create()
872
                ->filterByPrimaryKey($this->getPrimaryKey());
873
            $ret = $this->preDelete($con);
874
            if ($ret) {
875
                $deleteQuery->delete($con);
876
                $this->postDelete($con);
877
                $this->setDeleted(true);
878
            }
879
        });
880
    }
881
882
    /**
883
     * Persists this object to the database.

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

@@ 685-705 (lines=21) @@
682
     * @see BannerImageI18n::setDeleted()
683
     * @see BannerImageI18n::isDeleted()
684
     */
685
    public function delete(ConnectionInterface $con = null)
686
    {
687
        if ($this->isDeleted()) {
688
            throw new PropelException("This object has already been deleted.");
689
        }
690
691
        if ($con === null) {
692
            $con = Propel::getServiceContainer()->getWriteConnection(BannerImageI18nTableMap::DATABASE_NAME);
693
        }
694
695
        $con->transaction(function () use ($con) {
696
            $deleteQuery = ChildBannerImageI18nQuery::create()
697
                ->filterByPrimaryKey($this->getPrimaryKey());
698
            $ret = $this->preDelete($con);
699
            if ($ret) {
700
                $deleteQuery->delete($con);
701
                $this->postDelete($con);
702
                $this->setDeleted(true);
703
            }
704
        });
705
    }
706
707
    /**
708
     * Persists this object to the database.

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

@@ 702-722 (lines=21) @@
699
     * @see Banners::setDeleted()
700
     * @see Banners::isDeleted()
701
     */
702
    public function delete(ConnectionInterface $con = null)
703
    {
704
        if ($this->isDeleted()) {
705
            throw new PropelException("This object has already been deleted.");
706
        }
707
708
        if ($con === null) {
709
            $con = Propel::getServiceContainer()->getWriteConnection(BannersTableMap::DATABASE_NAME);
710
        }
711
712
        $con->transaction(function () use ($con) {
713
            $deleteQuery = ChildBannersQuery::create()
714
                ->filterByPrimaryKey($this->getPrimaryKey());
715
            $ret = $this->preDelete($con);
716
            if ($ret) {
717
                $deleteQuery->delete($con);
718
                $this->postDelete($con);
719
                $this->setDeleted(true);
720
            }
721
        });
722
    }
723
724
    /**
725
     * Persists this object to the database.

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

@@ 565-585 (lines=21) @@
562
     * @see BannersI18n::setDeleted()
563
     * @see BannersI18n::isDeleted()
564
     */
565
    public function delete(ConnectionInterface $con = null)
566
    {
567
        if ($this->isDeleted()) {
568
            throw new PropelException("This object has already been deleted.");
569
        }
570
571
        if ($con === null) {
572
            $con = Propel::getServiceContainer()->getWriteConnection(BannersI18nTableMap::DATABASE_NAME);
573
        }
574
575
        $con->transaction(function () use ($con) {
576
            $deleteQuery = ChildBannersI18nQuery::create()
577
                ->filterByPrimaryKey($this->getPrimaryKey());
578
            $ret = $this->preDelete($con);
579
            if ($ret) {
580
                $deleteQuery->delete($con);
581
                $this->postDelete($con);
582
                $this->setDeleted(true);
583
            }
584
        });
585
    }
586
587
    /**
588
     * Persists this object to the database.

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

@@ 707-727 (lines=21) @@
704
     * @see PageLink::setDeleted()
705
     * @see PageLink::isDeleted()
706
     */
707
    public function delete(ConnectionInterface $con = null)
708
    {
709
        if ($this->isDeleted()) {
710
            throw new PropelException("This object has already been deleted.");
711
        }
712
713
        if ($con === null) {
714
            $con = Propel::getServiceContainer()->getWriteConnection(PageLinkTableMap::DATABASE_NAME);
715
        }
716
717
        $con->transaction(function () use ($con) {
718
            $deleteQuery = ChildPageLinkQuery::create()
719
                ->filterByPrimaryKey($this->getPrimaryKey());
720
            $ret = $this->preDelete($con);
721
            if ($ret) {
722
                $deleteQuery->delete($con);
723
                $this->postDelete($con);
724
                $this->setDeleted(true);
725
            }
726
        });
727
    }
728
729
    /**
730
     * Persists this object to the database.

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

@@ 507-527 (lines=21) @@
504
     * @see PageLinkProduct::setDeleted()
505
     * @see PageLinkProduct::isDeleted()
506
     */
507
    public function delete(ConnectionInterface $con = null)
508
    {
509
        if ($this->isDeleted()) {
510
            throw new PropelException("This object has already been deleted.");
511
        }
512
513
        if ($con === null) {
514
            $con = Propel::getServiceContainer()->getWriteConnection(PageLinkProductTableMap::DATABASE_NAME);
515
        }
516
517
        $con->transaction(function () use ($con) {
518
            $deleteQuery = ChildPageLinkProductQuery::create()
519
                ->filterByPrimaryKey($this->getPrimaryKey());
520
            $ret = $this->preDelete($con);
521
            if ($ret) {
522
                $deleteQuery->delete($con);
523
                $this->postDelete($con);
524
                $this->setDeleted(true);
525
            }
526
        });
527
    }
528
529
    /**
530
     * Persists this object to the database.

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

@@ 507-527 (lines=21) @@
504
     * @see PageLinkProducts::setDeleted()
505
     * @see PageLinkProducts::isDeleted()
506
     */
507
    public function delete(ConnectionInterface $con = null)
508
    {
509
        if ($this->isDeleted()) {
510
            throw new PropelException("This object has already been deleted.");
511
        }
512
513
        if ($con === null) {
514
            $con = Propel::getServiceContainer()->getWriteConnection(PageLinkProductsTableMap::DATABASE_NAME);
515
        }
516
517
        $con->transaction(function () use ($con) {
518
            $deleteQuery = ChildPageLinkProductsQuery::create()
519
                ->filterByPrimaryKey($this->getPrimaryKey());
520
            $ret = $this->preDelete($con);
521
            if ($ret) {
522
                $deleteQuery->delete($con);
523
                $this->postDelete($con);
524
                $this->setDeleted(true);
525
            }
526
        });
527
    }
528
529
    /**
530
     * Persists this object to the database.