| Current Path : /var/www/v3.cesa.co.za/src/SessionsBundle/Repository/ |
| Current File : /var/www/v3.cesa.co.za/src/SessionsBundle/Repository/SitesRepository.php |
<?php
namespace App\SessionsBundle\Repository;
use App\SessionsBundle\Entity\Sites;
/**
* SitesRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class SitesRepository extends \Doctrine\ORM\EntityRepository {
/**
* Get other sites
*
* @param Sites $site
* @return array
*/
public function getOtherSites(Sites $site = null) {
$qb = $this->createQueryBuilder('si');
if (is_object($site)) {
$qb = $qb->where('si.id <> :siteId')->setParameter('siteId', $site->getId());
}
$qb = $qb->getQuery()
->execute()
;
return $qb;
}
}