#1423 #1441 - Ansicht der Kalender, Kalender neu auslesen und darstellen

git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3441 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
adametz 2018-08-14 15:14:56 +00:00
parent 0af86f618c
commit 0ac8127653
10 changed files with 365 additions and 73 deletions

View file

@ -56,6 +56,16 @@ class CalendarDayState
*/
private $date = null;
/**
* @var bool
*/
private $isEmpty; //empty day in the month
/**
* @var bool
*/
private $isPastDate;
/**
* @return int
*/
@ -200,4 +210,75 @@ class CalendarDayState
$this->date = $date;
}
/**
* @return bool
*/
public function getIsEmpty(): bool
{
return $this->isEmpty;
}
/**
* @param bool $isEmpty
*/
public function setIsEmpty(bool $isEmpty)
{
$this->isEmpty = $isEmpty;
}
/**
* @return bool
*/
public function getIsPastDate(): bool
{
return $this->isPastDate;
}
/**
* @param bool $isPastDate
*/
public function setIsPastDate(bool $isPastDate)
{
$this->isPastDate = $isPastDate;
}
public function getCssClass(){
$ret = "";
if($this->getIsPastDate()){
$ret .= 'calendar-light ';
}
if($this->getDay() == 0){
$ret .= 'calendar-day-non ';
}
if($this->getIsReserved()){
$ret .= 'calendar-day-disabled ';
return $ret;
}
if($this->getIsReservationBegin() && $this->getIsReservationEnd()){
$ret .= 'calendar-day-disabled-half ';
return $ret;
}
if($this->getIsReservationBegin()){
$ret .= 'calendar-day-reservation-begin ';
return $ret;
}
if($this->getIsReservationEnd()){
$ret .= 'calendar-day-reservation-end ';
return $ret;
}
return $ret;
}
}