mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 12:33:26 +00:00
Allow retrieve collection by a collection of base ids
This commit is contained in:
@@ -95,6 +95,25 @@ WHERE base_id = :baseId';
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $basesId
|
||||
* @return CollectionReference[]
|
||||
*/
|
||||
public function findMany(array $basesId)
|
||||
{
|
||||
if (empty($basesId)) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$rows = $this->connection->fetchAll(
|
||||
self::$selectQuery . ' WHERE base_id IN (:baseIds)',
|
||||
['baseIds' => $basesId],
|
||||
['baseIds' => Connection::PARAM_INT_ARRAY]
|
||||
);
|
||||
|
||||
return $this->createManyReferences($rows);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $databoxId
|
||||
* @param int $collectionId
|
||||
|
Reference in New Issue
Block a user