mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
Braindump of collection-fields map
This commit is contained in:

committed by
Benoît Burnichon

parent
041f017fd7
commit
9172da904b
@@ -227,6 +227,25 @@ class databox extends base
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public function get_collection_unique_ids()
|
||||
{
|
||||
$conn = $this->app['phraseanet.appbox']->get_connection();
|
||||
$sql = "SELECT b.base_id FROM bas b
|
||||
WHERE b.sbas_id = :sbas_id AND b.active = '1'
|
||||
ORDER BY b.ord ASC";
|
||||
$stmt = $conn->prepare($sql);
|
||||
$stmt->execute([':sbas_id' => $this->id]);
|
||||
$rs = $stmt->fetchAll(PDO::FETCH_ASSOC);
|
||||
$stmt->closeCursor();
|
||||
|
||||
$base_ids = [];
|
||||
foreach ($rs as $row) {
|
||||
$base_ids[] = (int) $row['base_id'];
|
||||
}
|
||||
|
||||
return $base_ids;
|
||||
}
|
||||
|
||||
protected function get_available_collections()
|
||||
{
|
||||
try {
|
||||
|
Reference in New Issue
Block a user