We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents cad6680 + 6cb8c52 commit 977f99dCopy full SHA for 977f99d
1 file changed
src/Entity/Cfp.php
@@ -93,7 +93,7 @@ public function toArray()
93
'cfp_start_date' => $this->dateStart->format('c'),
94
'cfp_end_date' => $this->dateEnd->format('c'),
95
'description' => $this->description,
96
- 'tags' => $this->tags,
+ 'tags' => array_unique($this->tags),
97
'start_date' => $this->eventStartDate->format('c'),
98
'end_date' => $this->eventEndDate->format('c'),
99
'location' => $this->location,
@@ -102,4 +102,11 @@ public function toArray()
102
'timezone' => $this->timezone,
103
);
104
}
105
+
106
+ public function addTag($tag)
107
+ {
108
+ if (! in_array($tag, $this->tags)) {
109
+ $this->tags[] = $tag;
110
+ }
111
112
0 commit comments