| @@ 379-386 (lines=8) @@ | ||
| 376 | $objectFactory = $this->getSession()->getObjectFactory(); |
|
| 377 | $result = array(); |
|
| 378 | if (count($versions) !== null) { |
|
| 379 | foreach ($versions as $objectData) { |
|
| 380 | $document = $objectFactory->convertObject($objectData, $context); |
|
| 381 | if (!(!$document instanceof DocumentInterface)) { |
|
| 382 | // this should never happen |
|
| 383 | continue; |
|
| 384 | } |
|
| 385 | $result[] = $document; |
|
| 386 | } |
|
| 387 | } |
|
| 388 | ||
| 389 | return $result; |
|
| @@ 309-317 (lines=9) @@ | ||
| 306 | ||
| 307 | $result = array(); |
|
| 308 | $objectFactory = $this->getObjectFactory(); |
|
| 309 | foreach ($checkedOutDocs->getObjects() as $objectData) { |
|
| 310 | $document = $objectFactory->convertObject($objectData, $context); |
|
| 311 | if (!($document instanceof DocumentInterface)) { |
|
| 312 | // should not happen but could happen if the repository is not implemented correctly ... |
|
| 313 | continue; |
|
| 314 | } |
|
| 315 | ||
| 316 | $result[] = $document; |
|
| 317 | } |
|
| 318 | ||
| 319 | return $result; |
|
| 320 | } |
|