◆ calculatePeriod()
static TaskScheduleHelper::calculatePeriod |
( |
|
$datetime = null | ) |
|
|
static |
Definition at line 42 of file task_schedule_field_renderer.inc.
44 $d =
new DateTime($datetime);
46 $day =
$d->format(
"N") - 1;
48 $hour =
$d->format(
"H");
50 $sp =
"{$day}:{$hour}:00";
52 trace(
"Schedule Period for $datetime is $sp", 3);
if(!checkRole($library->allow_access) &&! $library->allowAccess()) if(!checkRole($document->allow_access)) $d
◆ drawScheduleBox()
static TaskScheduleHelper::drawScheduleBox |
( |
|
$id, |
|
|
|
$value, |
|
|
|
$readOnly = false |
|
) |
| |
|
static |
Definition at line 11 of file task_schedule_field_renderer.inc.
13 echo
"<table id='{$id}' class='task_schedule'><thead><tr><th> </th>";
14 for($i = 0; $i < 7; ++$i)
16 $day = jddayofweek($i, 2);
18 echo
"<th class='schedule_day'>{$day}</th>";
23 for($hour = 0; $hour < 24; ++$hour)
25 $desc = str_pad($hour, 2,
'0', STR_PAD_LEFT).
":00";
28 echo
"<th class='schedule_period'>$desc</td>";
30 for($i = 0; $i < 7; ++$i)
32 $idx =
"{$i}:{$desc}";
33 $class = (strpos($value, $idx) !== FALSE) ?
"period selected" :
"period";
34 echo
"<td class='{$class}' data-period='$idx'></td>";
39 echo
"</tbody></table>";
The documentation for this class was generated from the following file: