\KEYWORD

KEYWORD common routines

Summary

Methods
Properties
Constants
__construct()
grabAll()
checkExists()
removeHanging()
writeKeywordTable()
transferArrows()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct() : 

KEYWORD class

Returns

grabAll()

grabAll(  userBib = FALSE,   kType = FALSE,  typeArray = FALSE) : mixed||string|int

Get keyword names from WKX_keyword.

Parameters

userBib

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

kType

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

mixed||string|int —

id => keyword or FALSE

checkExists()

checkExists(  keyword) : 

Does this keyword already exist in the database?

Parameters

keyword

return mixed Existing keyword ID of FALSE

Returns

removeHanging()

removeHanging() : 

Remove resource-less keywords from keyword list

Returns

writeKeywordTable()

writeKeywordTable(mixed||string|int  inputArray,   id = FALSE) : 

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

Parameters

mixed||string|int inputArray
id

Default is FALSE

Returns

FALSE or array of keyword IDs

transferArrows()

transferArrows() : mixed||string|int

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

Returns

mixed||string|int —

(toRightImage, toLeftImage)