| @@ 38-54 (lines=17) @@ | ||
| 35 | /** |
|
| 36 | * @inheritdoc |
|
| 37 | */ |
|
| 38 | public function getEditableEvents(String $uitId) |
|
| 39 | { |
|
| 40 | $q = $this->connection->createQueryBuilder(); |
|
| 41 | $q->select('event_id') |
|
| 42 | ->from($this->tableName->toNative()) |
|
| 43 | ->where('user_id = :userId') |
|
| 44 | ->setParameter(':userId', $uitId->toNative()); |
|
| 45 | ||
| 46 | $results = $q->execute(); |
|
| 47 | ||
| 48 | $events = array(); |
|
| 49 | while ($id = $results->fetchColumn(0)) { |
|
| 50 | $events[] = new String($id); |
|
| 51 | } |
|
| 52 | ||
| 53 | return $events; |
|
| 54 | } |
|
| 55 | ||
| 56 | /** |
|
| 57 | * @inheritdoc |
|
| @@ 146-162 (lines=17) @@ | ||
| 143 | ); |
|
| 144 | } |
|
| 145 | ||
| 146 | public function getEventsLocatedAtPlace($placeId) |
|
| 147 | { |
|
| 148 | $q = $this->connection->createQueryBuilder(); |
|
| 149 | $q->select('event') |
|
| 150 | ->from($this->tableName) |
|
| 151 | ->where('place = ?') |
|
| 152 | ->setParameter(0, $placeId); |
|
| 153 | ||
| 154 | $results = $q->execute(); |
|
| 155 | ||
| 156 | $events = array(); |
|
| 157 | while ($id = $results->fetchColumn(0)) { |
|
| 158 | $events[] = $id; |
|
| 159 | } |
|
| 160 | ||
| 161 | return $events; |
|
| 162 | } |
|
| 163 | ||
| 164 | public function getEventsOrganizedByOrganizer($organizerId) |
|
| 165 | { |
|
| @@ 164-181 (lines=18) @@ | ||
| 161 | return $events; |
|
| 162 | } |
|
| 163 | ||
| 164 | public function getEventsOrganizedByOrganizer($organizerId) |
|
| 165 | { |
|
| 166 | $q = $this->connection->createQueryBuilder(); |
|
| 167 | $q |
|
| 168 | ->select('event') |
|
| 169 | ->from($this->tableName) |
|
| 170 | ->where('organizer = ?') |
|
| 171 | ->setParameter(0, $organizerId); |
|
| 172 | ||
| 173 | $results = $q->execute(); |
|
| 174 | ||
| 175 | $events = array(); |
|
| 176 | while ($id = $results->fetchColumn(0)) { |
|
| 177 | $events[] = $id; |
|
| 178 | } |
|
| 179 | ||
| 180 | return $events; |
|
| 181 | } |
|
| 182 | ||
| 183 | public function removeRelations($eventId) |
|
| 184 | { |
|
| @@ 53-70 (lines=18) @@ | ||
| 50 | ); |
|
| 51 | } |
|
| 52 | ||
| 53 | public function getPlacesOrganizedByOrganizer($organizerId) |
|
| 54 | { |
|
| 55 | $q = $this->connection->createQueryBuilder(); |
|
| 56 | $q |
|
| 57 | ->select('event') |
|
| 58 | ->from($this->tableName) |
|
| 59 | ->where('organizer = ?') |
|
| 60 | ->setParameter(0, $organizerId); |
|
| 61 | ||
| 62 | $results = $q->execute(); |
|
| 63 | ||
| 64 | $events = array(); |
|
| 65 | while ($id = $results->fetchColumn(0)) { |
|
| 66 | $events[] = $id; |
|
| 67 | } |
|
| 68 | ||
| 69 | return $events; |
|
| 70 | } |
|
| 71 | ||
| 72 | public function removeRelations($eventId) |
|
| 73 | { |
|
| @@ 38-54 (lines=17) @@ | ||
| 35 | /** |
|
| 36 | * @inheritdoc |
|
| 37 | */ |
|
| 38 | public function getEditablePlaces(String $uitId) |
|
| 39 | { |
|
| 40 | $q = $this->connection->createQueryBuilder(); |
|
| 41 | $q->select('place_id') |
|
| 42 | ->from($this->tableName->toNative()) |
|
| 43 | ->where('user_id = :userId') |
|
| 44 | ->setParameter(':userId', $uitId->toNative()); |
|
| 45 | ||
| 46 | $results = $q->execute(); |
|
| 47 | ||
| 48 | $places = array(); |
|
| 49 | while ($id = $results->fetchColumn(0)) { |
|
| 50 | $places[] = new String($id); |
|
| 51 | } |
|
| 52 | ||
| 53 | return $places; |
|
| 54 | } |
|
| 55 | ||
| 56 | /** |
|
| 57 | * @inheritdoc |
|