private function sort_events(AthleticEvent $a, AthleticEvent $b) { $startA = $a->getStartTime(); $startB = $b->getStartTime(); if ($startA == $startB) { return 0; } return $startA < $startB ? -1 : 1; }
protected function getFieldsForSechedule(AthleticEvent $event) { return array('title' => $event->getTitle(), 'id' => $event->getID(), 'sport' => $event->getSport(), 'sportName' => $event->getSportName(), 'gender' => $event->getGender(), 'start' => $this->timeText($event), 'pastStatus' => $event->getStartTime() > time() ? false : true, 'location' => $event->getLocation(), 'link' => $event->getLink()); }
protected function timeText(AthleticEvent $event, $timeOnly = false) { return DateFormatter::formatDateRange($event->getRange(), DateFormatter::SHORT_STYLE, DateFormatter::SHORT_STYLE); }
public function setUp() { parent::setUp(); $this->simpleDocument = $this->buildSimpleDocument()->save(); }