mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-13 13:03:20 +00:00
Allow retrieve collection by a collection of base ids
This commit is contained in:
@@ -72,6 +72,25 @@ class ArrayCacheCollectionReferenceRepository implements CollectionReferenceRepo
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $baseIds
|
||||
* @return CollectionReference[]
|
||||
*/
|
||||
public function findMany(array $baseIds)
|
||||
{
|
||||
$references = $this->findAll();
|
||||
|
||||
$requested = [];
|
||||
|
||||
foreach ($baseIds as $baseId) {
|
||||
if (isset($references[$baseId])) {
|
||||
$requested[] = $references[$baseId];
|
||||
}
|
||||
}
|
||||
|
||||
return $requested;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $databoxId
|
||||
* @param int $collectionId
|
||||
@@ -90,6 +109,10 @@ class ArrayCacheCollectionReferenceRepository implements CollectionReferenceRepo
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array|null $baseIdsSubset
|
||||
* @return CollectionReference[]
|
||||
*/
|
||||
public function findHavingOrderMaster(array $baseIdsSubset = null)
|
||||
{
|
||||
return $this->repository->findHavingOrderMaster($baseIdsSubset);
|
||||
|
Reference in New Issue
Block a user