Method:
grabAll()
Class:
KEYWORD
Method Call:
include_once("core/keyword/KEYWORD.php");
$keyword = new KEYWORD($this->db);
ASSOC. ARRAY $keyword->grabAll([$userBibliographyId = FALSE, STRING: $databaseTable = "WKX_resource_keyword"]);
Description:
Returns an associative array of all the keywords in the WIKINDX database suitable for use with a HTML form select box. If $userBibliographyId is supplied, the list of keywords is limited to keywords from resources within that user bibliography. If $databaseTable is supplied (WKX_resource_keyword, WKX_resource_quote, WKX_resource_paraphrase or WKX_resource_musing) in addition to $userBibliographyId, then the list will be further restricted to keywords that exist in those tables. If $databaseTable is supplied but $userBibliographyId is FALSE, then the complete list of keywords from WKX_keyword is returned.
Usage:
include_once("core/keyword/KEYWORD.php"); $keyword = new KEYWORD$this->db); $userBibId = $session->getVar("mywikindx_bibliography_use"); $keywordArray = $keyword->grabAll($userBibId); $keywordArray will be something like: array( '675' => 'Semantics', '32' => 'Semiology', '53' => 'Semiotics', );The keys of the arrays are the ID numbers in the database table WKX_keyword and are the IDs that are inserted in the keywords field of WKX_resource_keyword, the quote_keywords field of WKX_resource_quote, the paraphrase_keywords field of WKX_resource_paraphrase or the musing_keywords field of WKX_resource_musing.