| @@ 234-251 (lines=18) @@ | ||
| 231 | * |
|
| 232 | * @return \eZ\Publish\API\Repository\Values\Content\TrashItem |
|
| 233 | */ |
|
| 234 | protected function buildTrashItem(Location $location) |
|
| 235 | { |
|
| 236 | return new TrashItem( |
|
| 237 | array( |
|
| 238 | 'contentInfo' => $location->contentInfo, |
|
| 239 | 'id' => $location->id, |
|
| 240 | 'priority' => $location->priority, |
|
| 241 | 'hidden' => $location->hidden, |
|
| 242 | 'invisible' => $location->invisible, |
|
| 243 | 'remoteId' => $location->remoteId, |
|
| 244 | 'parentLocationId' => $location->parentLocationId, |
|
| 245 | 'pathString' => $location->pathString, |
|
| 246 | 'depth' => (int)$location->depth, |
|
| 247 | 'sortField' => $location->sortField, |
|
| 248 | 'sortOrder' => $location->sortOrder, |
|
| 249 | ) |
|
| 250 | ); |
|
| 251 | } |
|
| 252 | } |
|
| 253 | ||
| @@ 345-362 (lines=18) @@ | ||
| 342 | * |
|
| 343 | * @return \eZ\Publish\API\Repository\Values\Content\TrashItem |
|
| 344 | */ |
|
| 345 | protected function buildDomainTrashItemObject(Trashed $spiTrashItem) |
|
| 346 | { |
|
| 347 | return new TrashItem( |
|
| 348 | array( |
|
| 349 | 'contentInfo' => $this->repository->getContentService()->loadContentInfo($spiTrashItem->contentId), |
|
| 350 | 'id' => $spiTrashItem->id, |
|
| 351 | 'priority' => $spiTrashItem->priority, |
|
| 352 | 'hidden' => $spiTrashItem->hidden, |
|
| 353 | 'invisible' => $spiTrashItem->invisible, |
|
| 354 | 'remoteId' => $spiTrashItem->remoteId, |
|
| 355 | 'parentLocationId' => $spiTrashItem->parentId, |
|
| 356 | 'pathString' => $spiTrashItem->pathString, |
|
| 357 | 'depth' => $spiTrashItem->depth, |
|
| 358 | 'sortField' => $spiTrashItem->sortField, |
|
| 359 | 'sortOrder' => $spiTrashItem->sortOrder, |
|
| 360 | ) |
|
| 361 | ); |
|
| 362 | } |
|
| 363 | ||
| 364 | /** |
|
| 365 | * @param int $timestamp |
|
| @@ 2363-2380 (lines=18) @@ | ||
| 2360 | * |
|
| 2361 | * @return array |
|
| 2362 | */ |
|
| 2363 | private function loadLocationProperties(Location $location, array $overwrite = array()) |
|
| 2364 | { |
|
| 2365 | return array_merge( |
|
| 2366 | array( |
|
| 2367 | 'id' => $location->id, |
|
| 2368 | 'depth' => $location->depth, |
|
| 2369 | 'parentLocationId' => $location->parentLocationId, |
|
| 2370 | 'pathString' => $location->pathString, |
|
| 2371 | 'remoteId' => $location->remoteId, |
|
| 2372 | 'hidden' => $location->hidden, |
|
| 2373 | 'invisible' => $location->invisible, |
|
| 2374 | 'priority' => $location->priority, |
|
| 2375 | 'sortField' => $location->sortField, |
|
| 2376 | 'sortOrder' => $location->sortOrder, |
|
| 2377 | ), |
|
| 2378 | $overwrite |
|
| 2379 | ); |
|
| 2380 | } |
|
| 2381 | ||
| 2382 | /** |
|
| 2383 | * Assert generated aliases to expected alias return. |
|