\JCategoryNode
Helper class to load Categorytree
Synopsis
class JCategoryNode
extends JObject
{
- // members
- public $id;
- public $asset_id;
- public $parent_id;
- public $lft;
- public $rgt;
- public $level;
- public $extension;
- public $title;
- public $alias;
- public $description;
- public $published;
- public $checked_out;
- public $checked_out_time;
- public $access;
- public $params;
- public $metadesc;
- public $metakey;
- public $metadata;
- public $created_user_id;
- public $created_time;
- public $modified_user_id;
- public $modified_time;
- public $hits;
- public $language;
- public $numitems;
- public $childrennumitems;
- public $slug;
- public $assets;
- protected $_parent;
- protected Array $_children;
- protected $_path;
- protected $_leftSibling;
- protected $_rightSibling;
- protected $_allChildrenloaded;
- protected $_constructor;
- // Inherited members from JObject
- protected $_errors;
- // methods
- public void __construct()
- public void setParent()
- public void addChild()
- public void removeChild()
- public array getChildren()
- public mixed getParent()
- public boolean hasChildren()
- public boolean hasParent()
- public void setSibling()
- public mixed getSibling()
- public JRegistry getParams()
- public JRegistry getMetadata()
- public array getPath()
- public JUser getAuthor()
- public void setAllLoaded()
- public integer getNumItems()
- // Inherited methods from JObject
- public void __construct()
- public string __toString()
- public mixed def()
- public mixed get()
- public array getProperties()
- public string getError()
- public array getErrors()
- public mixed set()
- public boolean setProperties()
- public void setError()
Hierarchy
Extends
Members
protected
- $_allChildrenloaded
—
boolean
true if all children have been loaded - $_children — Array
- $_constructor
—
Constructor of this tree - $_errors
—
array
An array of error messages or Exception objects. - $_leftSibling
—
integer
Category left of this one - $_parent
—
Parent Category object - $_path
—
array
Path from root to this category - $_rightSibling
—
Category right of this one
public
- $access
—
integer
Access level for the category - $alias
—
string
The the alias for the category - $asset_id
—
integer
The id of the category in the asset table - $assets
—
array
Array of assets - $checked_out
—
boolean
Whether the category is or is not checked out - $checked_out_time
—
string
The time at which the category was checked out - $childrennumitems
—
integer
Number of children items - $created_time
—
string
The time at which the category was created - $created_user_id
—
integer
The ID of the user who created the category - $description
—
string
Description of the category. - $extension
—
integer
The extension this category is associated with - $hits
—
integer
Nmber of times the category has been viewed - $id
—
integer
Primary key - $language
—
string
The language for the category in xx-XX format - $level
—
integer
The depth of this category's position in the category tree - $lft
—
integer
The lft value for this category in the category tree - $metadata
—
string
JSON string of other meta data - $metadesc
—
string
Metadata description - $metakey
—
string
Key words for meta data - $modified_time
—
string
The time at which the category was modified - $modified_user_id
—
integer
The ID of the user who last modified the category - $numitems
—
integer
Number of items in this category or descendants of this category - $params
—
string
JSON string of parameters - $parent_id
—
integer
The id of the parent of category in the asset table, 0 for category root - $published
—
boolean
The publication status of the category - $rgt
—
integer
The rgt value for this category in the category tree - $slug
—
string
Slug fo the category (used in URL) - $title
—
string
The menu title for the category (a short name)
Methods
public
- __construct() — Class constructor
- addChild() — Add child to this node
- getAuthor() — Returns the user that created the category
- getChildren() — Get the children of this node
- getMetadata() — Returns the category metadata
- getNumItems() — Returns the number of items.
- getParams() — Returns the category parameters
- getParent() — Get the parent of this node
- getPath() — Returns the category path to the root category
- getSibling() — Returns the right or left sibling of a category
- hasChildren() — Test if this node has children
- hasParent() — Test if this node has a parent
- removeChild() — Remove a specific child
- setAllLoaded() — Set to load all children
- setParent() — Set the parent of this category
- setSibling() — Function to set the left or right sibling of a category
Inherited from JObject
public
- __toString() — Magic method to convert the object to a string gracefully.
- def() — Sets a default value if not alreay assigned
- get() — Returns a property of the object or the default value if the property is not set.
- getError() — Get the most recent error message.
- getErrors() — Return all errors, if any.
- getProperties() — Returns an associative array of object properties.
- set() — Modifies a property of the object, creating it if it does not already exist.
- setError() — Add an error message.
- setProperties() — Set the object properties based on a named array/hash.