add admin timetable

This commit is contained in:
2019-10-23 08:49:40 +02:00
committed by Roland Schneider
parent 1300bfc752
commit bf85c737d5
32 changed files with 1037 additions and 120 deletions

View File

@@ -0,0 +1,50 @@
<?php /** @noinspection ALL */
namespace common\modules\event\models\timetable;
use customerapi\models\available\EventInterval;
/** @noinspection PhpUnused */
/**
* Class TimeTableMonthWeek
* @property EventInterval $interval
* @property TimeTableMonthDay $monday
* @property TimeTableMonthDay $tuesday
* @property TimeTableMonthDay $wednesday
* @property TimeTableMonthDay $thursday
* @property TimeTableMonthDay $friday
* @property TimeTableMonthDay $saturday
* @property TimeTableMonthDay $sunday
* @property integer $weekNumber
*/
class TimeTableMonthWeek
{
public $monday;
public $tuesday;
public $wednesday;
public $thursday;
public $friday;
public $saturday;
public $sunday;
public $weekNumber;
/**Get the week day bay property name
* @param $weekDay
* @return mixed
*/
public function getWeekDay($weekDay)
{
$days = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'];
$days = array_combine($days, $days);
$objectAttribute = $days[$weekDay];
/** @var TimeTableMonthDay $day */
return $this->$objectAttribute;
}
}