KEYWORD common routines

version 1
package wikindx4\core\keyword
author Mark Grimshaw

 Methods

KEYWORD class

__construct() 

Does this keyword already exist in the database?

checkExists(string $keyword) 

Parameters

$keyword

string

return mixed Existing keyword ID of FALSE

Get keyword names from WKX_keyword.

grabAll(boolean $userBib, mixed $kType, $typeArray) : array

Parameters

$userBib

boolean

FALSE (default) or TRUE (return only resource types within current user bibliography)

$kType

mixed

FALSE (default) or metadata type or metadata array ('quote', 'paraphrase' etc). Gather only keywords attached to metadata

$typeArray

FALSE (default) or limits keywords to those belonging to these types (only when table == 'resource_keyword')

Returns

arrayid => keyword or FALSE

Remove resource-less keywords from keyword list

removeHanging() 

Make the keyword select transfer arrows to transfer keywords between select boxes with onclick

transferArrows() : array

Returns

array(toRightImage, toLeftImage)

Write names to keyword table and return keyword id array ready for adding to resource_keyword.resourcekeywordKeywordId fields.

writeKeywordTable(array $inputArray, mixed $id) : mixed
todo Check if $id is actually needed at all

Parameters

$inputArray

array

$id

mixed

Default is FALSE

Returns

mixedFALSE or array of keyword IDs

 Properties

 

$commonBib 
 

$db 
 

$html 
 

$messages