-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEventPost.php
74 lines (62 loc) · 1.77 KB
/
EventPost.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
require "BasePost.php";
class EventPost extends BasePost {
private $eventId;
private $startTime, $endTime;
private $place;
private $eventName;
public function __construct($postId, $eventId, $type, $message, $story, $imageUrls, $createdTime,
$startTime, $endTime, $place, $eventName) {
parent::__construct($postId, $type, $message, $story, $imageUrls, $createdTime);
$this->eventId = $eventId;
$this->startTime = $startTime;
$this->endTime = $endTime;
$this->place = $place;
$this->eventName = $eventName;
}
public function getEventId() {
return $this->eventId;
}
public function getStartTime() {
return $this->startTime;
}
public function getEndTime() {
return $this->endTime;
}
public function getPlace() {
return $this->place;
}
public function getEventName() {
return $this->eventName;
}
public function setEventId($eventId) {
$this->eventId = $eventId;
}
public function setStartTime($startTime) {
$this->startTime = $startTime;
}
public function setEndTime($endTime) {
$this->endTime = $endTime;
}
public function setPlace($place) {
$this->place = $place;
}
public function setEventName($eventName) {
$this->eventName = $eventName;
}
public function toHtml() {
echo '<div class="tl-circ"></div>';
echo '<div class="timeline-panel">';
echo '<div class="tl-heading">';
echo '<h4>' . $this->getEventName() . '</h4>';
echo '<p><small class="text-muted"><i class="material-icons" style="font-size: 14px;vertical-align: middle;">
schedule</i> ' . strftime("%e.%B", $this->getCreatedTime()->getTimestamp()) . '</small></p>';
echo '</div>';
echo '<div class="tl-body">';
echo '<p>' . $this->getMessage() . '</p>';
$this->imgToHtml();
echo '</div>';
echo '</div>';
}
}
?>