public function sumOfferCount()
    {
        $count = $this->getOfferCount();
        if ($this->getParent()) {
            $count += $this->getParent()->getOfferCount();
        }

        if ($this->getLinkedSites()->count()) {
            /** @var Site $linked */
            foreach ($this->getLinkedSites() as $linked) {
                $count += $linked->getOfferCount();
            }
        }

        if ($this->getSubDomains()->count()) {
            foreach ($this->getSubDomains() as $linked) {
                $count += $linked->getOfferCount();
            }
        }

        return $count;
    }
public function sumOfferCount()
    {
        $count = $this->getOfferCount();
        if ($this->getParent()) {
            $count += $this->getParent()->getOfferCount();
        }

        if ($this->getLinkedSites()->count()) {
            /** @var Site $linked */
            foreach ($this->getLinkedSites() as $linked) {
                $count += $linked->getOfferCount();
            }
        }

        if ($this->getSubDomains()->count()) {
            foreach ($this->getSubDomains() as $linked) {
                $count += $linked->getOfferCount();
            }
        }

        return $count;
    }
public function sumOfferCount ( ) { $ count = $ this -> getOfferCount ( ) ; if ( $ this -> getParent ( ) ) { $ count += $ this -> getParent ( ) -> getOfferCount ( ) ; } if ( $ this -> getLinkedSites ( ) -> count ( ) ) { /** @var Site $linked */ foreach ( $ this -> getLinkedSites ( ) as $ linked ) { $ count += $ linked -> getOfferCount ( ) ; } } if ( $ this -> getSubDomains ( ) -> count ( ) ) { foreach ( $ this -> getSubDomains ( ) as $ linked ) { $ count += $ linked -> getOfferCount ( ) ; } } return $ count ; }
Get sum of all offers

@return mixed
Get sum of all offers