Method:
grabAll()
Class:
COLLECTION
Method Call:
include_once("core/collection/COLLECTION.php");
$collection = new COLLECTION($this->db);
ASSOC. ARRAY $collection->grabAll([STRING: $collectionType = FALSE, INT: $userBibliographyId = FALSE]);
Description:
Returns an associative array of all the collections in the WIKINDX database suitable for use with a HTML form select box. If $collectionType is supplied, the list of collections is limited to collections of a particular type (see core/collection/COLLECTIONMAP.php). If $userBibliographyId is supplied, the list of collections is limited to collections from resources within that user bibliography. If both limitations are supplied, both will be applied.
Usage:
include_once("core/collection/COLLECTION.php");
$collection = new COLLECTION($this->db);
$collectionArray = $collection->grabAll('music');
$collectionArray will be something like:
array(
'39' => 'Beautiful Maladies: The Island Years',
'74' => 'Chopin Préludes Op. 28',
'11' => 'Mozart Complete Piano Sonatas',
);
The keys of the arrays are the ID numbers in the database table WKX_collection and are the IDs that are inserted in the collection field in WKX_resource_misc.