| @@ 239-256 (lines=18) @@ | ||
| 236 | * |
|
| 237 | * @return \eZ\Publish\API\Repository\Values\Content\TrashItem |
|
| 238 | */ |
|
| 239 | protected function buildTrashItem(Location $location) |
|
| 240 | { |
|
| 241 | return new TrashItem( |
|
| 242 | array( |
|
| 243 | 'contentInfo' => $location->contentInfo, |
|
| 244 | 'id' => $location->id, |
|
| 245 | 'priority' => $location->priority, |
|
| 246 | 'hidden' => $location->hidden, |
|
| 247 | 'invisible' => $location->invisible, |
|
| 248 | 'remoteId' => $location->remoteId, |
|
| 249 | 'parentLocationId' => $location->parentLocationId, |
|
| 250 | 'pathString' => $location->pathString, |
|
| 251 | 'depth' => (int)$location->depth, |
|
| 252 | 'sortField' => $location->sortField, |
|
| 253 | 'sortOrder' => $location->sortOrder, |
|
| 254 | ) |
|
| 255 | ); |
|
| 256 | } |
|
| 257 | } |
|
| 258 | ||
| @@ 2441-2458 (lines=18) @@ | ||
| 2438 | * |
|
| 2439 | * @return array |
|
| 2440 | */ |
|
| 2441 | private function loadLocationProperties(Location $location, array $overwrite = array()) |
|
| 2442 | { |
|
| 2443 | return array_merge( |
|
| 2444 | array( |
|
| 2445 | 'id' => $location->id, |
|
| 2446 | 'depth' => $location->depth, |
|
| 2447 | 'parentLocationId' => $location->parentLocationId, |
|
| 2448 | 'pathString' => $location->pathString, |
|
| 2449 | 'remoteId' => $location->remoteId, |
|
| 2450 | 'hidden' => $location->hidden, |
|
| 2451 | 'invisible' => $location->invisible, |
|
| 2452 | 'priority' => $location->priority, |
|
| 2453 | 'sortField' => $location->sortField, |
|
| 2454 | 'sortOrder' => $location->sortOrder, |
|
| 2455 | ), |
|
| 2456 | $overwrite |
|
| 2457 | ); |
|
| 2458 | } |
|
| 2459 | ||
| 2460 | /** |
|
| 2461 | * Assert generated aliases to expected alias return. |
|
| @@ 351-369 (lines=19) @@ | ||
| 348 | return $trashItems; |
|
| 349 | } |
|
| 350 | ||
| 351 | protected function buildDomainTrashItemObject(Trashed $spiTrashItem, Content $content): APITrashItem |
|
| 352 | { |
|
| 353 | return new TrashItem( |
|
| 354 | array( |
|
| 355 | 'content' => $content, |
|
| 356 | 'contentInfo' => $content->contentInfo, |
|
| 357 | 'id' => $spiTrashItem->id, |
|
| 358 | 'priority' => $spiTrashItem->priority, |
|
| 359 | 'hidden' => $spiTrashItem->hidden, |
|
| 360 | 'invisible' => $spiTrashItem->invisible, |
|
| 361 | 'remoteId' => $spiTrashItem->remoteId, |
|
| 362 | 'parentLocationId' => $spiTrashItem->parentId, |
|
| 363 | 'pathString' => $spiTrashItem->pathString, |
|
| 364 | 'depth' => $spiTrashItem->depth, |
|
| 365 | 'sortField' => $spiTrashItem->sortField, |
|
| 366 | 'sortOrder' => $spiTrashItem->sortOrder, |
|
| 367 | ) |
|
| 368 | ); |
|
| 369 | } |
|
| 370 | ||
| 371 | /** |
|
| 372 | * @param int $timestamp |
|