JCategories

JCategories Class.

since

1.6

package

Joomla.Legacy

Methods

__construct

Class constructor

__construct(array $options) 
since

1.6

Arguments

$options

arrayArray of options

_load

Load method

_load(integer $id) : void
since

1.6

Arguments

$id

integerId of category to load

get

Loads a specific category and all its children in a JCategoryNode object

get(mixed $id = 'root', boolean $forceload = false) : \JCategoryNode|null|boolean
since

1.6

Arguments

$id

mixedan optional id integer or equal to 'root'

$forceload

booleanTrue to force the _load method to execute

Response

\JCategoryNode|null|booleanJCategoryNode object or null if $id is not valid

getInstance

Returns a reference to a JCategories object

getInstance(string $extension, array $options = array()) : \JCategories|boolean
static
since

1.6

Arguments

$extension

stringName of the categories extension

$options

arrayAn array of options

Response

\JCategories|booleanJCategories object on success, boolean false if an object does not exist

Properties

instances

Array to hold the object instances

static

Type(s)

array<mixed,\JCategories>

_nodes

Array of category nodes

Type(s)

array<mixed,\JCategoryNode>

_checkedCategories

Array of checked categories -- used to save values when _nodes are null

Type(s)

array<mixed,boolean>

_extension

Name of the extension the categories belong to

Type(s)

string

_table

Name of the linked content table to get category content count

Type(s)

string

_field

Name of the category field

Type(s)

string

_key

Name of the key field

Type(s)

string

_statefield

Name of the items state field

Type(s)

string

_options

Array of options

Type(s)

array