|
@@ 1741-1752 (lines=12) @@
|
| 1738 |
|
|
| 1739 |
|
/** @var $relations \eZ\Publish\API\Repository\Values\Content\Relation[] */ |
| 1740 |
|
$relations = []; |
| 1741 |
|
foreach ($spiRelations as $spiRelation) { |
| 1742 |
|
$destinationContentInfo = $this->internalLoadContentInfo($spiRelation->destinationContentId); |
| 1743 |
|
if (!$this->repository->canUser('content', 'read', $destinationContentInfo)) { |
| 1744 |
|
continue; |
| 1745 |
|
} |
| 1746 |
|
|
| 1747 |
|
$relations[] = $this->domainMapper->buildRelationDomainObject( |
| 1748 |
|
$spiRelation, |
| 1749 |
|
$contentInfo, |
| 1750 |
|
$destinationContentInfo |
| 1751 |
|
); |
| 1752 |
|
} |
| 1753 |
|
|
| 1754 |
|
return $relations; |
| 1755 |
|
} |
|
@@ 1779-1790 (lines=12) @@
|
| 1776 |
|
); |
| 1777 |
|
|
| 1778 |
|
$returnArray = []; |
| 1779 |
|
foreach ($spiRelations as $spiRelation) { |
| 1780 |
|
$sourceContentInfo = $this->internalLoadContentInfo($spiRelation->sourceContentId); |
| 1781 |
|
if (!$this->repository->canUser('content', 'read', $sourceContentInfo)) { |
| 1782 |
|
continue; |
| 1783 |
|
} |
| 1784 |
|
|
| 1785 |
|
$returnArray[] = $this->domainMapper->buildRelationDomainObject( |
| 1786 |
|
$spiRelation, |
| 1787 |
|
$sourceContentInfo, |
| 1788 |
|
$contentInfo |
| 1789 |
|
); |
| 1790 |
|
} |
| 1791 |
|
|
| 1792 |
|
return $returnArray; |
| 1793 |
|
} |