| @@ 496-514 (lines=19) @@ | ||
| 493 | return $this->mapLocation($spiLocation, $contentInfo, $content); |
|
| 494 | } |
|
| 495 | ||
| 496 | private function mapLocation(SPILocation $spiLocation, ContentInfo $contentInfo, APIContent $content): APILocation |
|
| 497 | { |
|
| 498 | return new Location( |
|
| 499 | array( |
|
| 500 | 'content' => $content, |
|
| 501 | 'contentInfo' => $contentInfo, |
|
| 502 | 'id' => $spiLocation->id, |
|
| 503 | 'priority' => $spiLocation->priority, |
|
| 504 | 'hidden' => $spiLocation->hidden, |
|
| 505 | 'invisible' => $spiLocation->invisible, |
|
| 506 | 'remoteId' => $spiLocation->remoteId, |
|
| 507 | 'parentLocationId' => $spiLocation->parentId, |
|
| 508 | 'pathString' => $spiLocation->pathString, |
|
| 509 | 'depth' => $spiLocation->depth, |
|
| 510 | 'sortField' => $spiLocation->sortField, |
|
| 511 | 'sortOrder' => $spiLocation->sortOrder, |
|
| 512 | ) |
|
| 513 | ); |
|
| 514 | } |
|
| 515 | ||
| 516 | /** |
|
| 517 | * Build API Content domain objects in bulk and apply to ContentSearchResult. |
|
| @@ 343-361 (lines=19) @@ | ||
| 340 | return $trashItems; |
|
| 341 | } |
|
| 342 | ||
| 343 | protected function buildDomainTrashItemObject(Trashed $spiTrashItem, Content $content): APITrashItem |
|
| 344 | { |
|
| 345 | return new TrashItem( |
|
| 346 | array( |
|
| 347 | 'content' => $content, |
|
| 348 | 'contentInfo' => $content->contentInfo, |
|
| 349 | 'id' => $spiTrashItem->id, |
|
| 350 | 'priority' => $spiTrashItem->priority, |
|
| 351 | 'hidden' => $spiTrashItem->hidden, |
|
| 352 | 'invisible' => $spiTrashItem->invisible, |
|
| 353 | 'remoteId' => $spiTrashItem->remoteId, |
|
| 354 | 'parentLocationId' => $spiTrashItem->parentId, |
|
| 355 | 'pathString' => $spiTrashItem->pathString, |
|
| 356 | 'depth' => $spiTrashItem->depth, |
|
| 357 | 'sortField' => $spiTrashItem->sortField, |
|
| 358 | 'sortOrder' => $spiTrashItem->sortOrder, |
|
| 359 | ) |
|
| 360 | ); |
|
| 361 | } |
|
| 362 | ||
| 363 | /** |
|
| 364 | * @param int $timestamp |
|