예제 #1
0
 /**
  * @param Brand $brand
  * @return array
  */
 public function findAllWithHotelsForBrand($brand = null)
 {
     $queryBuilder = $this->createQueryBuilder('r')->select('r')->distinct()->join('r.hotels', 'h');
     if ($brand && $brand->getArtsysID() != 'SEH') {
         $queryBuilder->andWhere('h.brand = :brand')->setParameter(':brand', $brand);
     }
     return $queryBuilder->andWhere('h.active = :active')->andWhere('h.adherent = :adherent')->setParameter(':active', true)->setParameter(':adherent', true)->getQuery()->getResult();
 }
예제 #2
0
 /**
  * Add brand
  *
  * @param \Seh\Bundle\SehBundle\Entity\Brand $brand
  * @return $this
  */
 public function addBrand($brand)
 {
     $brand->addFaqQuestion($this);
     $this->brands->add($brand);
     return $this;
 }
예제 #3
0
 /**
  * @param ImportedBrand $source
  * @param Brand $destination
  * @return mixed
  */
 public function map($source, $destination)
 {
     $destination->setArtsysID($source->getCode());
     $destination->setName($source->getName());
     return $destination;
 }
예제 #4
0
파일: Hotel.php 프로젝트: blab2015/seh
 /**
  * Get brand
  *
  * @return string
  */
 public function getBrandName()
 {
     return $this->brand->getName();
 }
예제 #5
0
파일: Hotel.php 프로젝트: blab2015/seh
 /**
  * @param Brand $brand
  * @return $this
  */
 public function setBrand(\Seh\Bundle\SehBundle\Entity\Brand $brand = null)
 {
     $this->brand = $brand;
     $brand->addHotel($this);
     return $this;
 }
예제 #6
0
파일: Customer.php 프로젝트: blab2015/seh
 /**
  * Removes a brand.
  *
  * @param Brand $brand
  * @return $this For fluid purposes.
  */
 public function removeBrand(\Seh\Bundle\SehBundle\Entity\Brand $brand)
 {
     $this->brands->removeElement($brand);
     return $this;
 }