Method:
grabAll()
Class:
PUBLISHER
Method Call:
include_once("core/publisher/PUBLISHER.php");
$publisher = new PUBLISHER($this->db);
ASSOC. ARRAY $collection->grabAll([STRING: $publisherType = FALSE, INT: $userBibliographyId = FALSE]);
Description:
Returns an associative array of all the publishers in the WIKINDX database suitable for use with a HTML form select box. If $publisherType is supplied, the list of publishers is limited to publishers of a particular type (see core/publisher/PUBLISHERMAP.php). If $userBibliographyId is supplied, the list of publishers is limited to publishers from resources within that user bibliography. If both limitations are supplied, both will be applied.
Usage:
include_once("core/publisher/PUBLISHER.php"); $publisher = new PUBLISHER($this->db); $userBibId = $session->getVar("mywikindx_bibliography_use"); $publisherArray = $publisher->grabAll('book', $userBibId); $publisherArray will be something like: array( '50' => 'MacMillan: London', '48' => 'Vanity Publishers Inc.: Monrovia', '321' => 'MacMillan: New York', );The keys of the arrays are the ID numbers in the database table WKX_publisher and are the IDs that are inserted in the publisher field in WKX_resource_misc.