Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/calendar/view/AphrontCalendarEventView.php
12256 views
1
<?php
2
3
final class AphrontCalendarEventView extends AphrontView {
4
5
private $hostPHID;
6
private $name;
7
private $epochStart;
8
private $epochEnd;
9
private $description;
10
private $eventID;
11
private $viewerIsInvited;
12
private $uri;
13
private $isAllDay;
14
private $icon;
15
private $iconColor;
16
private $canEdit;
17
private $isCancelled;
18
private $datetimeSummary;
19
20
public function setIconColor($icon_color) {
21
$this->iconColor = $icon_color;
22
return $this;
23
}
24
25
public function getIconColor() {
26
return $this->iconColor;
27
}
28
29
public function setIsCancelled($is_cancelled) {
30
$this->isCancelled = $is_cancelled;
31
return $this;
32
}
33
34
public function getIsCancelled() {
35
return $this->isCancelled;
36
}
37
38
public function setURI($uri) {
39
$this->uri = $uri;
40
return $this;
41
}
42
43
public function getURI() {
44
return $this->uri;
45
}
46
47
public function setEventID($event_id) {
48
$this->eventID = $event_id;
49
return $this;
50
}
51
public function getEventID() {
52
return $this->eventID;
53
}
54
55
public function setViewerIsInvited($viewer_is_invited) {
56
$this->viewerIsInvited = $viewer_is_invited;
57
return $this;
58
}
59
public function getViewerIsInvited() {
60
return $this->viewerIsInvited;
61
}
62
63
public function setHostPHID($host_phid) {
64
$this->hostPHID = $host_phid;
65
return $this;
66
}
67
68
public function getHostPHID() {
69
return $this->hostPHID;
70
}
71
72
public function setName($name) {
73
$this->name = $name;
74
return $this;
75
}
76
77
public function setEpochRange($start, $end) {
78
$this->epochStart = $start;
79
$this->epochEnd = $end;
80
return $this;
81
}
82
83
public function getEpochStart() {
84
return $this->epochStart;
85
}
86
87
public function getEpochEnd() {
88
return $this->epochEnd;
89
}
90
91
public function getName() {
92
return $this->name;
93
}
94
95
public function setDescription($description) {
96
$this->description = $description;
97
return $this;
98
}
99
100
public function getDescription() {
101
return $this->description;
102
}
103
104
public function setIsAllDay($is_all_day) {
105
$this->isAllDay = $is_all_day;
106
return $this;
107
}
108
109
public function getIsAllDay() {
110
return $this->isAllDay;
111
}
112
113
public function setIcon($icon) {
114
$this->icon = $icon;
115
return $this;
116
}
117
118
public function getIcon() {
119
return $this->icon;
120
}
121
122
public function setCanEdit($can_edit) {
123
$this->canEdit = $can_edit;
124
return $this;
125
}
126
127
public function getCanEdit() {
128
return $this->canEdit;
129
}
130
131
public function getMultiDay() {
132
$nextday = strtotime('12:00 AM Tomorrow', $this->getEpochStart());
133
if ($this->getEpochEnd() > $nextday) {
134
return true;
135
}
136
return false;
137
}
138
139
public function setDatetimeSummary($datetime_summary) {
140
$this->datetimeSummary = $datetime_summary;
141
return $this;
142
}
143
144
public function getDatetimeSummary() {
145
return $this->datetimeSummary;
146
}
147
148
public function render() {
149
throw new Exception(pht('Events are only rendered indirectly.'));
150
}
151
152
}
153
154