Categories
Implements CategoryInterface, \Joomla\Database\DatabaseAwareInterfaceCategories Class.
since |
1.6 |
---|---|
package |
Joomla CMS |
Methods
__construct
Class constructor
__construct(array options) : mixed
since |
1.6 |
---|
Arguments
- options
array
Array of options
Response
mixed
_load
Load method
_load(int id) : void
since |
1.6 |
---|
Arguments
- id
int
Id of category to load
get
Loads a specific category and all its children in a CategoryNode object.
get(mixed id = 'root', bool 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
\Joomla\CMS\Categories\CategoryNode|null
CategoryNode object or null if $id is not valid
getExtension
Returns the extension of the category.
getExtension() : string
since |
3.9.0 |
---|
Response
string
The extension
getInstance
Returns a reference to a Categories object
getInstance(string extension, array options = array()) : \Joomla\CMS\Categories\Categories|bool
since |
1.6 |
---|---|
deprecated |
5.0 Use the ComponentInterface to get the categories |
Arguments
- extension
string
Name of the categories extension- options
array
An array of options
Response
\Joomla\CMS\Categories\Categories|bool
Categories object on success, boolean false if an object does not exist
Properties
_checkedCategories
Array of checked categories -- used to save values when _nodes are null