| @@ 264-279 (lines=16) @@ | ||
| 261 | * |
|
| 262 | * @return \eZ\Publish\API\Repository\Values\Content\Location $location, with updated hidden value |
|
| 263 | */ |
|
| 264 | public function hideLocation(Location $location) |
|
| 265 | { |
|
| 266 | $returnValue = $this->service->hideLocation($location); |
|
| 267 | $this->signalDispatcher->emit( |
|
| 268 | new HideLocationSignal( |
|
| 269 | array( |
|
| 270 | 'locationId' => $location->id, |
|
| 271 | 'contentId' => $location->contentId, |
|
| 272 | 'currentVersionNo' => $returnValue->getContentInfo()->currentVersionNo, |
|
| 273 | 'parentLocationId' => $returnValue->parentLocationId, |
|
| 274 | ) |
|
| 275 | ) |
|
| 276 | ); |
|
| 277 | ||
| 278 | return $returnValue; |
|
| 279 | } |
|
| 280 | ||
| 281 | /** |
|
| 282 | * Unhides the $location. |
|
| @@ 293-308 (lines=16) @@ | ||
| 290 | * |
|
| 291 | * @return \eZ\Publish\API\Repository\Values\Content\Location $location, with updated hidden value |
|
| 292 | */ |
|
| 293 | public function unhideLocation(Location $location) |
|
| 294 | { |
|
| 295 | $returnValue = $this->service->unhideLocation($location); |
|
| 296 | $this->signalDispatcher->emit( |
|
| 297 | new UnhideLocationSignal( |
|
| 298 | array( |
|
| 299 | 'locationId' => $location->id, |
|
| 300 | 'contentId' => $location->contentId, |
|
| 301 | 'currentVersionNo' => $returnValue->getContentInfo()->currentVersionNo, |
|
| 302 | 'parentLocationId' => $returnValue->parentLocationId, |
|
| 303 | ) |
|
| 304 | ) |
|
| 305 | ); |
|
| 306 | ||
| 307 | return $returnValue; |
|
| 308 | } |
|
| 309 | ||
| 310 | /** |
|
| 311 | * Moves the subtree to $newParentLocation. |
|
| @@ 84-99 (lines=16) @@ | ||
| 81 | * |
|
| 82 | * @return null|\eZ\Publish\API\Repository\Values\Content\TrashItem null if location was deleted, otherwise TrashItem |
|
| 83 | */ |
|
| 84 | public function trash(Location $location) |
|
| 85 | { |
|
| 86 | $returnValue = $this->service->trash($location); |
|
| 87 | $this->signalDispatcher->emit( |
|
| 88 | new TrashSignal( |
|
| 89 | array( |
|
| 90 | 'locationId' => $location->id, |
|
| 91 | 'parentLocationId' => $location->parentLocationId, |
|
| 92 | 'contentId' => $location->contentId, |
|
| 93 | 'contentTrashed' => $returnValue instanceof TrashItem, |
|
| 94 | ) |
|
| 95 | ) |
|
| 96 | ); |
|
| 97 | ||
| 98 | return $returnValue; |
|
| 99 | } |
|
| 100 | ||
| 101 | /** |
|
| 102 | * Recovers the $trashedLocation at its original place if possible. |
|