CATEGORY
in package
Common methods for categories
Table of Contents
Methods
- __construct() : mixed
- CATEGORY
- grabAll() : mixed
- Get category names from category. Return associative array of id => category.
- grabSubAll() : array<string|int, mixed>|false
- Get subcategory names from subcategory. Return associative array of id => subcategory.
- transferArrowsCat() : array<string|int, mixed>
- Make the category select transfer arrows to transfer categories between select boxes with onclick
- transferArrowsCatUpDown() : array<string|int, mixed>
- Make the category select transfer arrows to transfer categories between select boxes with onclick (Up and Down)
- transferArrowsSubcat() : array<string|int, mixed>
- Make the subcategory select transfer arrows to transfer subcategories between select boxes with onclick
- transferArrowsSubcatUpDown() : array<string|int, mixed>
- Make the subcategory select transfer arrows to transfer subcategories between select boxes with onclick (Up and Down)
Methods
__construct()
CATEGORY
public
__construct() : mixed
grabAll()
Get category names from category. Return associative array of id => category.
public
grabAll([bool $userBib = false ][, bool $extant = false ][, mixed $typeArray = false ][, bool $withGeneral = true ]) : mixed
Parameters
- $userBib : bool = false
-
FALSE (default) or TRUE (return only resource types within current user bibliography)
- $extant : bool = false
-
FALSE (default) or TRUE (return only categories for which resources exist)
- $typeArray : mixed = false
-
FALSE (default) or limits categories to those belonging to these types
- $withGeneral : bool = true
-
FALSE (default) or include 'General' category in returned array
Return values
mixed —associative array or FALSE
grabSubAll()
Get subcategory names from subcategory. Return associative array of id => subcategory.
public
grabSubAll([bool $withCategory = false ][, bool $userBib = false ][, mixed $matchCategoryIds = false ][, bool $extant = false ]) : array<string|int, mixed>|false
Parameters
- $withCategory : bool = false
-
FALSE (default) or TRUE (return list of subcategories repended by their relevant category name)
- $userBib : bool = false
-
FALSE (default) or TRUE (return only resource types within current user bibliography)
- $matchCategoryIds : mixed = false
-
FALSE (default) or array of category IDs (returned subcategories must belong to those categories)
- $extant : bool = false
-
FALSE (default) or TRUE (return only resource types (or subcategories ?) for which resources exist)
Return values
array<string|int, mixed>|falsetransferArrowsCat()
Make the category select transfer arrows to transfer categories between select boxes with onclick
public
transferArrowsCat() : array<string|int, mixed>
Return values
array<string|int, mixed> —(toRightImage, toLeftImage)
transferArrowsCatUpDown()
Make the category select transfer arrows to transfer categories between select boxes with onclick (Up and Down)
public
transferArrowsCatUpDown() : array<string|int, mixed>
Return values
array<string|int, mixed> —(toRightImage, toLeftImage)
transferArrowsSubcat()
Make the subcategory select transfer arrows to transfer subcategories between select boxes with onclick
public
transferArrowsSubcat() : array<string|int, mixed>
Return values
array<string|int, mixed> —(toRightImage, toLeftImage)
transferArrowsSubcatUpDown()
Make the subcategory select transfer arrows to transfer subcategories between select boxes with onclick (Up and Down)
public
transferArrowsSubcatUpDown() : array<string|int, mixed>
Return values
array<string|int, mixed> —(toRightImage, toLeftImage)