Common methods for categories

version 1
package wikindx4\core\category
author Mark Grimshaw

 Methods

CATEGORY

__construct() 

Get category names from WKX_category.

grabAll(boolean $userBib, boolean $extant, mixed $typeArray, boolean $withGeneral) : mixed

Return associative array of id => category.

Parameters

$userBib

boolean

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

$extant

boolean

FALSE (default) or TRUE (return only categories for which resources exist)

$typeArray

mixed

FALSE (default) or limits categories to those belonging to these types

$withGeneral

boolean

FALSE (default) or include 'General' category in returned array

Returns

mixedassociative array or FALSE

Get subcategory names from WKX_subcategory.

grabSubAll(boolean $withCategory, boolean $userBib, mixed $matchCategoryIds, boolean | boolean $extant) : mixed

Return associative array of id => subcategory.

Parameters

$withCategory

boolean

FALSE (default) or TRUE (return list of subcategories repended by their relevant category name)

$userBib

boolean

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

$matchCategoryIds

mixed

FALSE (default) or array of category IDs (returned subcategories must belong to those categories)

$extant

booleanboolean

FALSE (default) or TRUE (return only resource types for which resources exist)

Returns

mixedassociative array or FALSE

Make the category select transfer arrows to transfer categories between select boxes with onclick

transferArrowsCat() : array

Returns

array(toRightImage, toLeftImage)

Make the category select transfer arrows to transfer categories between select boxes with onclick (Up and Down)

transferArrowsCatUpDown() : array

Returns

array(toRightImage, toLeftImage)

Make the subcategory select transfer arrows to transfer subcategories between select boxes with onclick

transferArrowsSubcat() : array

Returns

array(toRightImage, toLeftImage)

Make the subcategory select transfer arrows to transfer subcategories between select boxes with onclick (Up and Down)

transferArrowsSubcatUpDown() : array

Returns

array(toRightImage, toLeftImage)

 Properties

 

$commonBib 
 

$db 
 

$html 
 

$messages