git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3441 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
parent
0af86f618c
commit
0ac8127653
10 changed files with 365 additions and 73 deletions
|
|
@ -522,6 +522,22 @@ class FewoLodging
|
|||
return $this->prices;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get prices
|
||||
*
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getPricesFilter($dateFrom, $dateTo)
|
||||
{
|
||||
|
||||
return $this->getPrices()->filter(function(FewoPrice $price) use ($dateFrom, $dateTo) {
|
||||
return ($price->getSeason()->getFromDate() >= $dateFrom && $price->getSeason()->getFromDate() <= $dateTo) ||
|
||||
($price->getSeason()->getToDate() >= $dateFrom && $price->getSeason()->getToDate() <= $dateTo);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Add image
|
||||
*
|
||||
|
|
@ -590,6 +606,19 @@ class FewoLodging
|
|||
return $this->reservations;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get reservationsFilter
|
||||
*
|
||||
* @return \Doctrine\Common\Collections\Collection
|
||||
*/
|
||||
public function getReservationsFilter($dateFrom, $dateTo)
|
||||
{
|
||||
return $this->getReservations()->filter(function(FewoReservation $reservation) use ($dateFrom, $dateTo) {
|
||||
return ($reservation->getFromDate() >= $dateFrom && $reservation->getFromDate() <= $dateTo) ||
|
||||
($reservation->getToDate() >= $dateFrom && $reservation->getToDate() <= $dateTo);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Set page
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue