add admin timetable
This commit is contained in:
50
common/modules/event/models/timetable/TimeTableMonthWeek.php
Normal file
50
common/modules/event/models/timetable/TimeTableMonthWeek.php
Normal 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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user