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