class
CategoryNode extends JObject
Helper class to load Categorytree
Properties
integer
|
$id |
Primary key |
|
integer
|
$asset_id |
The id of the category in the asset table |
|
integer
|
$parent_id |
The id of the parent of category in the asset table, 0 for category root |
|
integer
|
$lft |
The lft value for this category in the category tree |
|
integer
|
$rgt |
The rgt value for this category in the category tree |
|
integer
|
$level |
The depth of this category's position in the category tree |
|
integer
|
$extension |
The extension this category is associated with |
|
string
|
$title |
The menu title for the category (a short name) |
|
string
|
$alias |
The the alias for the category |
|
string
|
$description |
Description of the category. |
|
boolean
|
$published |
The publication status of the category |
|
boolean
|
$checked_out |
Whether the category is or is not checked out |
|
string
|
$checked_out_time |
The time at which the category was checked out |
|
integer
|
$access |
Access level for the category |
|
string
|
$params |
JSON string of parameters |
|
string
|
$metadesc |
Metadata description |
|
string
|
$metakey |
Key words for metadata |
|
string
|
$metadata |
JSON string of other metadata |
|
integer
|
$created_user_id |
The ID of the user who created the category |
|
string
|
$created_time |
The time at which the category was created |
|
integer
|
$modified_user_id |
The ID of the user who last modified the category |
|
string
|
$modified_time |
The time at which the category was modified |
|
integer
|
$hits |
Nmber of times the category has been viewed |
|
string
|
$language |
The language for the category in xx-XX format |
|
integer
|
$numitems |
Number of items in this category or descendants of this category |
|
integer
|
$childrennumitems |
Number of children items |
|
string
|
$slug |
Slug fo the category (used in URL) |
|
array
|
$assets |
Array of assets |
|
Methods
getChildren(
boolean $recursive = false)
Get the children of this node
void
setSibling(
CategoryNode $sibling,
boolean $right = true)
Function to set the left or right sibling of a category
getSibling(
boolean $right = true)
Returns the right or left sibling of a category
array
getPath()
Returns the category path to the root category
JUser
getAuthor(
boolean $modified_user = false)
Returns the user that created the category
integer
getNumItems(
boolean $recursive = false)
Returns the number of items.
Details
__construct(
array $category = null,
CategoryNode $constructor = null)
void
setParent(
CategoryNode|null $parent)
Set the parent of this category
If the category already has a parent, the link is unset
Add child to this node
If the child already has a parent, the link is unset
void
removeChild(
integer $id)
CategoryNode[]
getChildren(
boolean $recursive = false)
Get the children of this node
Get the parent of this node
boolean
hasChildren()
Test if this node has children
boolean
hasParent()
Test if this node has a parent
void
setSibling(
CategoryNode $sibling,
boolean $right = true)
Function to set the left or right sibling of a category
CategoryNode|null
getSibling(
boolean $right = true)
Returns the right or left sibling of a category
Registry
getParams()
Returns the category parameters
Returns the category metadata
array
getPath()
Returns the category path to the root category
JUser
getAuthor(
boolean $modified_user = false)
Returns the user that created the category
integer
getNumItems(
boolean $recursive = false)
Returns the number of items.