Skip to content
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
namespace App\Command;

use Ibexa\Contracts\Core\Repository\ContentService;
use Ibexa\Contracts\Core\Repository\Iterator\BatchIterator;
use Ibexa\Contracts\Core\Repository\Iterator\BatchIteratorAdapter\RelationListIteratorAdapter;
use Ibexa\Contracts\Core\Repository\LocationService;
use Ibexa\Contracts\Core\Repository\ObjectStateService;
use Ibexa\Contracts\Core\Repository\PermissionResolver;
Expand Down Expand Up @@ -99,9 +101,13 @@ protected function execute(InputInterface $input, OutputInterface $output): int

// Relations
$versionInfo = $this->contentService->loadVersionInfo($contentInfo);
$relationCount = $this->contentService->countRelations($versionInfo);
$relationList = $this->contentService->loadRelationList($versionInfo, 0, $relationCount);
foreach ($relationList as $relationListItem) {
$relationListIterator = new BatchIterator(
new RelationListIteratorAdapter(
$this->contentService,
$versionInfo
)
);
foreach ($relationListIterator as $relationListItem) {
$name = $relationListItem->hasRelation() ? $relationListItem->getRelation()->destinationContentInfo->name : '(Unauthorized)';
$output->writeln("Relation to content '$name'");
}
Expand Down
Loading
Loading