Categories
Implements CategoryInterface, DatabaseAwareInterfaceCategories Class.
since |
1.6 |
---|---|
package |
Joomla CMS |
Methods
__construct
Class constructor
__construct(mixed||string|int options) :
since |
1.6 |
---|
Arguments
- options
array<string|int, mixed>
Array of options
Response
mixed
_load
Load method
_load(int|string id) :
since |
1.6 |
---|
Arguments
- id
int|string
Id of category to load
Response
void
get
Loads a specific category and all its children in a CategoryNode object.
get( id = 'root', forceload = false) : \Joomla\CMS\Categories\CategoryNode|null
since |
1.6 |
---|
Arguments
- id
mixed
an optional id integer or equal to 'root'- forceload
bool
True to force the _load method to execute
Response
CategoryNode|null
CategoryNode object or null if $id is not valid
getExtension
Returns the extension of the category.
getExtension() :
since |
3.9.0 |
---|
Response
string
The extension
getInstance
Returns a reference to a Categories object
getInstance( extension, mixed||string|int options = []) : \Joomla\CMS\Categories\Categories|bool
since |
1.6 |
---|---|
deprecated |
4.0 will be removed in 6.0 Use the ComponentInterface to get the categories Example: Factory::getApplication()->bootComponent($component)->getCategory($options, $section); |
Arguments
- extension
string
Name of the categories extension- options
array<string|int, mixed>
An array of options
Response
Categories|bool
Categories object on success, boolean false if an object does not exist
getOptions
Returns options.
getOptions() : mixed||string|int
since |
4.3.2 |
---|
Response
array<string|int, mixed>
Properties
_checkedCategories
Array of checked categories -- used to save values when _nodes are null
since |
1.6 |
---|
Type(s)
array<string|int, bool>
_extension
Name of the extension the categories belong to
since |
1.6 |
---|
Type(s)
string
_table
Name of the linked content table to get category content count
since |
1.6 |
---|
Type(s)
string
_field
Name of the category field
since |
1.6 |
---|
Type(s)
string
_key
Name of the key field
since |
1.6 |
---|
Type(s)
string
_statefield
Name of the items state field
since |
1.6 |
---|
Type(s)
string
_options
Array of options
since |
1.6 |
---|
Type(s)
array<string|int, mixed>