Ejemplo n.º 1
0
 private function sort_events(AthleticEvent $a, AthleticEvent $b)
 {
     $startA = $a->getStartTime();
     $startB = $b->getStartTime();
     if ($startA == $startB) {
         return 0;
     }
     return $startA < $startB ? -1 : 1;
 }
Ejemplo n.º 2
0
 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());
 }
Ejemplo n.º 3
0
 protected function timeText(AthleticEvent $event, $timeOnly = false)
 {
     return DateFormatter::formatDateRange($event->getRange(), DateFormatter::SHORT_STYLE, DateFormatter::SHORT_STYLE);
 }
Ejemplo n.º 4
0
 public function setUp()
 {
     parent::setUp();
     $this->simpleDocument = $this->buildSimpleDocument()->save();
 }