|
@@ 1657-1668 (lines=12) @@
|
| 1654 |
|
|
| 1655 |
|
/** @var $relations \eZ\Publish\API\Repository\Values\Content\Relation[] */ |
| 1656 |
|
$relations = array(); |
| 1657 |
|
foreach ($spiRelations as $spiRelation) { |
| 1658 |
|
$destinationContentInfo = $this->internalLoadContentInfo($spiRelation->destinationContentId); |
| 1659 |
|
if (!$this->repository->canUser('content', 'read', $destinationContentInfo)) { |
| 1660 |
|
continue; |
| 1661 |
|
} |
| 1662 |
|
|
| 1663 |
|
$relations[] = $this->domainMapper->buildRelationDomainObject( |
| 1664 |
|
$spiRelation, |
| 1665 |
|
$contentInfo, |
| 1666 |
|
$destinationContentInfo |
| 1667 |
|
); |
| 1668 |
|
} |
| 1669 |
|
|
| 1670 |
|
return $relations; |
| 1671 |
|
} |
|
@@ 1695-1706 (lines=12) @@
|
| 1692 |
|
); |
| 1693 |
|
|
| 1694 |
|
$returnArray = array(); |
| 1695 |
|
foreach ($spiRelations as $spiRelation) { |
| 1696 |
|
$sourceContentInfo = $this->internalLoadContentInfo($spiRelation->sourceContentId); |
| 1697 |
|
if (!$this->repository->canUser('content', 'read', $sourceContentInfo)) { |
| 1698 |
|
continue; |
| 1699 |
|
} |
| 1700 |
|
|
| 1701 |
|
$returnArray[] = $this->domainMapper->buildRelationDomainObject( |
| 1702 |
|
$spiRelation, |
| 1703 |
|
$sourceContentInfo, |
| 1704 |
|
$contentInfo |
| 1705 |
|
); |
| 1706 |
|
} |
| 1707 |
|
|
| 1708 |
|
return $returnArray; |
| 1709 |
|
} |