Exemple #1
0
 public function action_day_events()
 {
     $year = $this->request->param('year', date('Y'));
     $month = $this->request->param('month', date('m'));
     $day = $this->request->param('day', date('d'));
     $event_type = $this->request->param('event_type');
     $date = date('Y-m-d', mktime(0, 0, 0, (int) $month, (int) $day, $year));
     $events = Model_Event::daily_events($date);
     $day_events = array();
     foreach ($events as $event) {
         $day_events[] = Calendar_Event::factory($event->eventtype)->day_event($event);
     }
     $view = View::factory('calendar/day_events')->set('date', $date)->set('day_events', $day_events);
     $this->content = $view;
 }