blob: 6ed739f65589673f36942bffaae00d17fbbe0c42 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
<?php
Prado::using('Application.facades.Facade');
class EventFacade extends Facade {
public function getEventList($dateFrom=NULL, $dateTo=NULL, $calendars=NULL) {
$calendarClause = '1=1';
if ($calendars) {
$calendarClause = sprintf(
'_calendar IN (%s)',
implode(
',',
array_map(
function($calendar) {
return $this->quoteString($calendar->UID);
},
$calendars
)
)
);
}
return $this->fetchList(
'getEvents',
array(
'date_from' => $dateFrom ?: '0000-00-00 00:00:00',
'date_to' => $dateTo ?: '9999-99-99',
'calendar_clause' => $calendarClause
)
);
}
}
?>
|