Skip to content
Draft
Changes from all commits
Commits
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
25 changes: 22 additions & 3 deletions src/contracts/UniversalDiscovery/Provider.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php

/**
Expand Down Expand Up @@ -83,9 +83,28 @@
): array;

/**
* @param list<string> $locationIds
*
* @return array<array{
* Get list of (@see \Ibexa\Contracts\Core\Repository\Values\Content\Location locations} with their permissions.
*
* Returns a indexed array of hashes with the following structure:
* ```
* [
* [
* 'location' => (@see \Ibexa\Contracts\Core\Repository\Values\Content\Location],
* 'permissions' => [
* 'create' => [
* 'hasAccess' => bool true/false,
* 'restrictedContentTypeIds' => [1, 2, 3]
* ],
* 'edit' => [],
* ],
* ],
* ]
* ```
*
* @param array<int, string> $locationIds
*
* @return array<int, array> An array of assiative arrays with "location" and "permissions" keys
* @phpstan-return array<array{
* location: \Ibexa\Contracts\Core\Repository\Values\Content\Location,
* permissions: array{
* create: array{
Expand Down
Loading