public function addSiteFilter($site)
    {
        if ($site instanceof Site) {
            $site = $site->getUid();
        }

        if (!empty($site)) {
            $this->andWhere(
                'cc._uid IN (SELECT i.content_uid FROM BackBee\ClassContent\Indexes\IdxSiteContent i WHERE i.site_uid = :site_uid)'
            )->setParameter('site_uid', $site);
        }
    }
public function addSiteFilter($site)
    {
        if ($site instanceof Site) {
            $site = $site->getUid();
        }

        if (!empty($site)) {
            $this->andWhere(
                'cc._uid IN (SELECT i.content_uid FROM BackBee\ClassContent\Indexes\IdxSiteContent i WHERE i.site_uid = :site_uid)'
            )->setParameter('site_uid', $site);
        }
    }
public function addSiteFilter ( $ site ) { if ( $ site instanceof Site ) { $ site = $ site -> getUid ( ) ; } if ( ! empty ( $ site ) ) { $ this -> andWhere ( 'cc._uid IN (SELECT i.content_uid FROM BackBee\ClassContent\Indexes\IdxSiteContent i WHERE i.site_uid = :site_uid)' ) -> setParameter ( 'site_uid' , $ site ) ; } }
Add site filter to the query.

@param  mixed $site (BackBee/Site/Site|String)
Add site filter to the query .