Class JCategoryNode

Description

Helper class to load Categorytree

  • since: 11.1

Located in /libraries/joomla/application/categories.php (line 384)

JObject
   |
   --JCategoryNode
Variable Summary
integer $access
string $alias
array $assets
integer $asset_id
boolean $checked_out
string $description
integer $extension
integer $hits
integer $id
time $language
integer $level
integer $lft
string $metadata
string $metadesc
string $metakey
integer $numitems
string $params
integer $parent_id
boolean $published
integer $rgt
string $slug
string $title
Array $_children
integer $_leftSibling
object $_parent
array $_path
Method Summary
JCategoryNode __construct ([array $category = null], [JCategoryNode &$constructor = null])
void addChild (JNode &$child)
JUser getAuthor ([boolean $modified_user = false])
array &getChildren ([boolean $recursive = false])
integer getNumItems ([boolean $recursive = false])
mixed &getParent ()
array getPath ()
mixed getSibling ([boolean $right = true])
boolean hasChildren ()
boolean hasParent ()
void removeChild (integer $id)
void setAllLoaded ()
void setParent (mixed &$parent)
void setSibling (object $sibling, [boolean $right = true])
Variables
integer $access = null (line 497)

Access level for the category

  • since: 11.1
  • access: public
string $alias = null (line 457)

The the alias for the category

  • since: 11.1
  • access: public
array $assets = null (line 597)

Array of assets

  • since: 11.1
  • access: public
integer $asset_id = null (line 401)

The id of the category in the asset table

  • since: 11.1
  • access: public
boolean $checked_out = 0 (line 481)

Whether the category is or is not checked out

  • since: 11.1
  • access: public
time $checked_out_time = 0 (line 489)

The time at which the category was checked out

  • since: 11.1
  • access: public
$childrennumitems = null (line 581)

Number of children items

  • since: 11.1
  • access: public
time $created_time = null (line 539)

The time at which the category was created

  • since: 11.1
  • access: public
mixed $created_user_id = null (line 531)
  • access: public
string $description = null (line 465)

Description of the category.

  • since: 11.1
  • access: public
integer $extension = null (line 441)

The extension this category is associated with

  • since: 11.1
  • access: public
integer $hits = null (line 557)

Nmber of times the category has been viewed

  • since: 11.1
  • access: public
integer $id = null (line 393)

Primary key

  • since: 11.1
  • access: public
time $language = null (line 565)

The language for the category in xx-XX format

  • since: 11.1
  • access: public
integer $level = null (line 433)

The depth of this category's position in the category tree

  • since: 11.1
  • access: public
integer $lft = null (line 417)

The lft value for this category in the category tree

  • since: 11.1
  • access: public
string $metadata = null (line 529)

JSON string of other meta data

  • since: 11.1
  • access: public
string $metadesc = null (line 513)

Metadata description

  • since: 11.1
  • access: public
string $metakey = null (line 521)

Key words for meta data

  • since: 11.1
  • access: public
time $modified_time = null (line 549)

The time at which the category was modified

  • since: 11.1
  • access: public
mixed $modified_user_id = null (line 541)
  • access: public
integer $numitems = null (line 573)

Number of items in this category or descendants of this category

  • since: 11.1
  • access: public
string $params = null (line 505)

JSON string of parameters

  • since: 11.1
  • access: public
integer $parent_id = null (line 409)

The id of the parent of category in the asset table, 0 for category root

  • since: 11.1
  • access: public
boolean $published = null (line 473)

The publication status of the category

  • since: 11.1
  • access: public
integer $rgt = null (line 425)

The rgt value for this category in the category tree

  • since: 11.1
  • access: public
string $slug = null (line 589)

Slug fo the category (used in URL)

  • since: 11.1
  • access: public
string $title = null (line 449)

The menu title for the category (a short name)

  • since: 11.1
  • access: public
boolean $_allChildrenloaded = false (line 643)

true if all children have been loaded

  • since: 11.1
  • access: protected
Array $_children = array() (line 611)
  • var: of Children
  • since: 11.1
  • access: protected
$_constructor = null (line 651)

Constructor of this tree

  • since: 11.1
  • access: protected
integer $_leftSibling = null (line 627)

Category left of this one

  • since: 11.1
  • access: protected
object $_parent = null (line 605)

Parent Category object

  • since: 11.1
  • access: protected
array $_path = array() (line 619)

Path from root to this category

  • since: 11.1
  • access: protected
$_rightSibling = null (line 635)

Category right of this one

  • since: 11.1
  • access: protected

Inherited Variables

Inherited from JObject

JObject::$_errors
Methods
Constructor __construct (line 661)

Class constructor

  • since: 11.1
  • access: public
JCategoryNode __construct ([array $category = null], [JCategoryNode &$constructor = null])
  • array $category: The category data.
  • JCategoryNode &$constructor: The tree constructor.

Redefinition of:
JObject::__construct()
Class constructor, overridden in descendant classes.
addChild (line 734)

Add child to this node

If the child already has a parent, the link is unset

  • since: 11.1
  • access: public
void addChild (JNode &$child)
  • JNode &$child: The child to be added.
getAuthor (line 942)

Returns the user that created the category

  • return: A JUser object containing a userid
  • since: 11.1
  • access: public
JUser getAuthor ([boolean $modified_user = false])
  • boolean $modified_user: Returns the modified_user when set to true
getChildren (line 766)

Get the children of this node

  • return: The children
  • since: 11.1
  • access: public
array &getChildren ([boolean $recursive = false])
  • boolean $recursive: False by default
getMetadata (line 909)

Returns the category metadata

  • return: A JRegistry object containing the metadata
  • since: 11.1
  • access: public
JRegistry getMetadata ()
getNumItems (line 977)

Returns the number of items.

  • return: Number of children or descendants
  • since: 11.1
  • access: public
integer getNumItems ([boolean $recursive = false])
  • boolean $recursive: If false number of children, if true number of descendants
getParams (line 890)

Returns the category parameters

  • since: 11.1
  • access: public
JRegistry getParams ()
getParent (line 801)

Get the parent of this node

  • return: JNode or null
  • since: 11.1
  • access: public
mixed &getParent ()
getPath (line 928)

Returns the category path to the root category

  • since: 11.1
  • access: public
array getPath ()
getSibling (line 862)

Returns the right or left sibling of a category

  • return: JCategoryNode object with the sibling information or NULL if there is no sibling on that side.
  • since: 11.1
  • access: public
mixed getSibling ([boolean $right = true])
  • boolean $right: If set to false, returns the left sibling
hasChildren (line 813)

Test if this node has children

  • return: True if there is a child
  • since: 11.1
  • access: public
boolean hasChildren ()
hasParent (line 825)

Test if this node has a parent

  • return: True if there is a parent
  • since: 11.1
  • access: public
boolean hasParent ()
removeChild (line 751)

Remove a specific child

  • since: 11.1
  • access: public
void removeChild (integer $id)
  • integer $id: ID of a category
setAllLoaded (line 959)

Set to load all children

  • since: 11.1
  • access: public
void setAllLoaded ()
setParent (line 688)

Set the parent of this category

If the category already has a parent, the link is unset

  • since: 11.1
  • access: public
void setParent (mixed &$parent)
  • mixed &$parent: JCategoryNode for the parent to be set or null
setSibling (line 840)

Function to set the left or right sibling of a category

  • since: 11.1
  • access: public
void setSibling (object $sibling, [boolean $right = true])
  • object $sibling: JCategoryNode object for the sibling
  • boolean $right: If set to false, the sibling is the left one

Inherited Methods

Inherited From JObject

JObject::__construct()
JObject::def()
JObject::get()
JObject::getError()
JObject::getErrors()
JObject::getProperties()
JObject::set()
JObject::setError()
JObject::setProperties()
JObject::toString()
JObject::__toString()

Documentation generated on Mon, 25 Jun 2012 13:52:44 -0500 by phpDocumentor 1.4.4