| @@ 335-353 (lines=19) @@ | ||
| 332 | return $trashItems; |
|
| 333 | } |
|
| 334 | ||
| 335 | protected function buildDomainTrashItemObject(Trashed $spiTrashItem, Content $content): APITrashItem |
|
| 336 | { |
|
| 337 | return new TrashItem( |
|
| 338 | array( |
|
| 339 | 'content' => $content, |
|
| 340 | 'contentInfo' => $content->contentInfo, |
|
| 341 | 'id' => $spiTrashItem->id, |
|
| 342 | 'priority' => $spiTrashItem->priority, |
|
| 343 | 'hidden' => $spiTrashItem->hidden, |
|
| 344 | 'invisible' => $spiTrashItem->invisible, |
|
| 345 | 'remoteId' => $spiTrashItem->remoteId, |
|
| 346 | 'parentLocationId' => $spiTrashItem->parentId, |
|
| 347 | 'pathString' => $spiTrashItem->pathString, |
|
| 348 | 'depth' => $spiTrashItem->depth, |
|
| 349 | 'sortField' => $spiTrashItem->sortField, |
|
| 350 | 'sortOrder' => $spiTrashItem->sortOrder, |
|
| 351 | ) |
|
| 352 | ); |
|
| 353 | } |
|
| 354 | ||
| 355 | /** |
|
| 356 | * @param int $timestamp |
|
| @@ 502-520 (lines=19) @@ | ||
| 499 | return $this->mapLocation($spiLocation, $contentInfo, $content); |
|
| 500 | } |
|
| 501 | ||
| 502 | private function mapLocation(SPILocation $spiLocation, ContentInfo $contentInfo, APIContent $content): APILocation |
|
| 503 | { |
|
| 504 | return new Location( |
|
| 505 | array( |
|
| 506 | 'content' => $content, |
|
| 507 | 'contentInfo' => $contentInfo, |
|
| 508 | 'id' => $spiLocation->id, |
|
| 509 | 'priority' => $spiLocation->priority, |
|
| 510 | 'hidden' => $spiLocation->hidden, |
|
| 511 | 'invisible' => $spiLocation->invisible, |
|
| 512 | 'remoteId' => $spiLocation->remoteId, |
|
| 513 | 'parentLocationId' => $spiLocation->parentId, |
|
| 514 | 'pathString' => $spiLocation->pathString, |
|
| 515 | 'depth' => $spiLocation->depth, |
|
| 516 | 'sortField' => $spiLocation->sortField, |
|
| 517 | 'sortOrder' => $spiLocation->sortOrder, |
|
| 518 | ) |
|
| 519 | ); |
|
| 520 | } |
|
| 521 | ||
| 522 | /** |
|
| 523 | * Build API Content domain objects in bulk and apply to ContentSearchResult. |
|