[ Index ] |
PHP Cross Reference of Phabricator |
[Summary view] [Print] [Text view]
1 <?php 2 3 final class AphrontCalendarEventView extends AphrontView { 4 5 private $userPHID; 6 private $name; 7 private $epochStart; 8 private $epochEnd; 9 private $description; 10 private $eventID; 11 private $color; 12 13 public function setEventID($event_id) { 14 $this->eventID = $event_id; 15 return $this; 16 } 17 public function getEventID() { 18 return $this->eventID; 19 } 20 21 public function setUserPHID($user_phid) { 22 $this->userPHID = $user_phid; 23 return $this; 24 } 25 26 public function getUserPHID() { 27 return $this->userPHID; 28 } 29 30 public function setName($name) { 31 $this->name = $name; 32 return $this; 33 } 34 35 public function setEpochRange($start, $end) { 36 $this->epochStart = $start; 37 $this->epochEnd = $end; 38 return $this; 39 } 40 41 public function getEpochStart() { 42 return $this->epochStart; 43 } 44 45 public function getEpochEnd() { 46 return $this->epochEnd; 47 } 48 49 public function getName() { 50 return $this->name; 51 } 52 53 public function setDescription($description) { 54 $this->description = $description; 55 return $this; 56 } 57 58 public function getDescription() { 59 return $this->description; 60 } 61 62 public function setColor($color) { 63 $this->color = $color; 64 return $this; 65 } 66 public function getColor() { 67 if ($this->color) { 68 return $this->color; 69 } else { 70 return CalendarColors::COLOR_SKY; 71 } 72 } 73 74 public function getAllDay() { 75 $time = (60 * 60 * 22); 76 if (($this->getEpochEnd() - $this->getEpochStart()) >= $time) { 77 return true; 78 } 79 return false; 80 } 81 82 public function getMultiDay() { 83 $nextday = strtotime('12:00 AM Tomorrow', $this->getEpochStart()); 84 if ($this->getEpochEnd() > $nextday) { 85 return true; 86 } 87 return false; 88 } 89 90 public function render() { 91 throw new Exception('Events are only rendered indirectly.'); 92 } 93 94 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Nov 30 09:20:46 2014 | Cross-referenced by PHPXref 0.7.1 |