|
@@ 1667-1678 (lines=12) @@
|
| 1664 |
|
|
| 1665 |
|
/** @var $relations \eZ\Publish\API\Repository\Values\Content\Relation[] */ |
| 1666 |
|
$relations = array(); |
| 1667 |
|
foreach ($spiRelations as $spiRelation) { |
| 1668 |
|
$destinationContentInfo = $this->internalLoadContentInfo($spiRelation->destinationContentId); |
| 1669 |
|
if (!$this->repository->canUser('content', 'read', $destinationContentInfo)) { |
| 1670 |
|
continue; |
| 1671 |
|
} |
| 1672 |
|
|
| 1673 |
|
$relations[] = $this->domainMapper->buildRelationDomainObject( |
| 1674 |
|
$spiRelation, |
| 1675 |
|
$contentInfo, |
| 1676 |
|
$destinationContentInfo |
| 1677 |
|
); |
| 1678 |
|
} |
| 1679 |
|
|
| 1680 |
|
return $relations; |
| 1681 |
|
} |
|
@@ 1705-1716 (lines=12) @@
|
| 1702 |
|
); |
| 1703 |
|
|
| 1704 |
|
$returnArray = array(); |
| 1705 |
|
foreach ($spiRelations as $spiRelation) { |
| 1706 |
|
$sourceContentInfo = $this->internalLoadContentInfo($spiRelation->sourceContentId); |
| 1707 |
|
if (!$this->repository->canUser('content', 'read', $sourceContentInfo)) { |
| 1708 |
|
continue; |
| 1709 |
|
} |
| 1710 |
|
|
| 1711 |
|
$returnArray[] = $this->domainMapper->buildRelationDomainObject( |
| 1712 |
|
$spiRelation, |
| 1713 |
|
$sourceContentInfo, |
| 1714 |
|
$contentInfo |
| 1715 |
|
); |
| 1716 |
|
} |
| 1717 |
|
|
| 1718 |
|
return $returnArray; |
| 1719 |
|
} |