Changeset View
Changeset View
Standalone View
Standalone View
src/view/phui/calendar/PHUICalendarMonthView.php
Show First 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | foreach ($days as $day) { | ||||
if ($event->getIsAllDay()) { | if ($event->getIsAllDay()) { | ||||
$all_day_events[] = $event; | $all_day_events[] = $event; | ||||
} else { | } else { | ||||
$list_events[] = $event; | $list_events[] = $event; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
$max_daily = 15; | |||||
$counter = 0; | |||||
$list = new PHUICalendarListView(); | $list = new PHUICalendarListView(); | ||||
$list->setUser($this->user); | $list->setUser($this->user); | ||||
foreach ($all_day_events as $item) { | foreach ($all_day_events as $item) { | ||||
if ($counter <= $max_daily) { | |||||
$list->addEvent($item); | $list->addEvent($item); | ||||
} | } | ||||
$counter++; | |||||
} | |||||
foreach ($list_events as $item) { | foreach ($list_events as $item) { | ||||
if ($counter <= $max_daily) { | |||||
$list->addEvent($item); | $list->addEvent($item); | ||||
} | } | ||||
} | |||||
$uri = $this->getBrowseURI(); | $uri = $this->getBrowseURI(); | ||||
$uri = $uri.$day->format('Y').'/'. | $uri = $uri.$day->format('Y').'/'. | ||||
$day->format('m').'/'. | $day->format('m').'/'. | ||||
$day->format('d').'/'; | $day->format('d').'/'; | ||||
$cell_lists[] = array( | $cell_lists[] = array( | ||||
'list' => $list, | 'list' => $list, | ||||
▲ Show 20 Lines • Show All 475 Lines • Show Last 20 Lines |