| @@ 185-201 (lines=17) @@ | ||
| 182 | } |
|
| 183 | } |
|
| 184 | ||
| 185 | function getChild($name) { |
|
| 186 | ||
| 187 | $obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name); |
|
| 188 | ||
| 189 | if (!$obj) { |
|
| 190 | throw new NotFound('Calendar object not found'); |
|
| 191 | } |
|
| 192 | ||
| 193 | if ($this->isShared() && $obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE) { |
|
| 194 | throw new NotFound('Calendar object not found'); |
|
| 195 | } |
|
| 196 | ||
| 197 | $obj['acl'] = $this->getChildACL(); |
|
| 198 | ||
| 199 | return new CalendarObject($this->caldavBackend, $this->calendarInfo, $obj); |
|
| 200 | ||
| 201 | } |
|
| 202 | ||
| 203 | function getChildren() { |
|
| 204 | ||
| @@ 33-45 (lines=13) @@ | ||
| 30 | * @throws NotFound |
|
| 31 | * @return PublicCalendarObject |
|
| 32 | */ |
|
| 33 | public function getChild($name) { |
|
| 34 | $obj = $this->caldavBackend->getCalendarObject($this->calendarInfo['id'], $name); |
|
| 35 | ||
| 36 | if (!$obj) { |
|
| 37 | throw new NotFound('Calendar object not found'); |
|
| 38 | } |
|
| 39 | if ($obj['classification'] === CalDavBackend::CLASSIFICATION_PRIVATE) { |
|
| 40 | throw new NotFound('Calendar object not found'); |
|
| 41 | } |
|
| 42 | $obj['acl'] = $this->getChildACL(); |
|
| 43 | ||
| 44 | return new PublicCalendarObject($this->caldavBackend, $this->calendarInfo, $obj); |
|
| 45 | } |
|
| 46 | ||
| 47 | /** |
|
| 48 | * @return PublicCalendarObject[] |
|