* Mindestpreis im Slider oben im Reiseprogramm nicht anzeigen, wenn keine Termine vorhanden sind * Tripodo-Export git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3315 f459cee4-fb09-11de-96c3-f9c5f16c3c76
37 lines
1 KiB
PHP
37 lines
1 KiB
PHP
<?php
|
|
|
|
namespace AppBundle\Entity;
|
|
|
|
use Doctrine\ORM\Query\Expr;
|
|
|
|
/**
|
|
* TravelProgramRepository
|
|
*
|
|
* This class was generated by the Doctrine ORM. Add your own custom
|
|
* repository methods below.
|
|
*/
|
|
class TravelProgramRepository extends \Doctrine\ORM\EntityRepository
|
|
{
|
|
/**
|
|
* @return TravelProgram[]
|
|
*/
|
|
public function getProgramsToExport()
|
|
{
|
|
return $this->createQueryBuilder('tp')
|
|
->innerJoin('tp.page', 'page')
|
|
->addSelect('page')
|
|
->leftJoin('tp.countries', 'country')
|
|
->addSelect('country')
|
|
->leftJoin('country.destinations', 'destination')
|
|
->addSelect('destination')
|
|
->leftJoin('tp.options', 'option')
|
|
->addSelect('option')
|
|
->leftJoin('tp.images', 'image', Expr\Join::WITH, 'image.type = 1')
|
|
->addSelect('image')
|
|
->where('tp.status = 1')
|
|
->andWhere('tp.programType = '. TravelProgram::ORGANIZED_PROGRAM_TYPE)
|
|
->getQuery()
|
|
->execute()
|
|
;
|
|
}
|
|
}
|