Class JCategoryNode

Description

Helper class to load Categorytree

  • since: 11.1

Located in /libraries/legacy/categories/categories.php (line 374)

JObject
   |
   --JCategoryNode
Variable Summary
 integer $access
 string $alias
 array $assets
 integer $asset_id
 boolean $checked_out
 string $created_time
 string $description
 integer $extension
 integer $hits
 integer $id
 string $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 (JCategoryNode $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 (JCategoryNode $sibling, [boolean $right = true])
Variables
integer $access = null (line 486)

Access level for the category

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

The the alias for the category

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

Array of assets

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

The id of the category in the asset table

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

Whether the category is or is not checked out

  • since: 11.1
  • access: public
string $checked_out_time = 0 (line 478)

The time at which the category was checked out

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

Number of children items

  • since: 11.1
  • access: public
string $created_time = null (line 534)

The time at which the category was created

  • since: 11.1
  • access: public
integer $created_user_id = null (line 526)

The ID of the user who created the category

  • since: 11.1
  • access: public
string $description = null (line 454)

Description of the category.

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

The extension this category is associated with

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

Nmber of times the category has been viewed

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

Primary key

  • since: 11.1
  • access: public
string $language = null (line 566)

The language for the category in xx-XX format

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

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

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

The lft value for this category in the category tree

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

JSON string of other meta data

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

Metadata description

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

Key words for meta data

  • since: 11.1
  • access: public
string $modified_time = null (line 550)

The time at which the category was modified

  • since: 11.1
  • access: public
integer $modified_user_id = null (line 542)

The ID of the user who last modified the category

  • since: 11.1
  • access: public
integer $numitems = null (line 574)

Number of items in this category or descendants of this category

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

JSON string of parameters

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

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

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

The publication status of the category

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

The rgt value for this category in the category tree

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

Slug fo the category (used in URL)

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

The menu title for the category (a short name)

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

true if all children have been loaded

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

Constructor of this tree

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

Category left of this one

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

Parent Category object

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

Path from root to this category

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

Category right of this one

  • since: 11.1
  • access: protected

Inherited Variables

Inherited from JObject

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

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 735)

Add child to this node

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

  • since: 11.1
  • access: public
void addChild (JCategoryNode $child)
getAuthor (line 943)

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 767)

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 910)

Returns the category metadata

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

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 891)

Returns the category parameters

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

Get the parent of this node

  • return: JCategoryNode or null
  • since: 11.1
  • access: public
mixed getParent ()
getPath (line 929)

Returns the category path to the root category

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

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 814)

Test if this node has children

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

Test if this node has a parent

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

Remove a specific child

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

Set to load all children

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

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 841)

Function to set the left or right sibling of a category

  • since: 11.1
  • access: public
void setSibling (JCategoryNode $sibling, [boolean $right = true])
  • JCategoryNode $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()

Documentation generated on Tue, 19 Nov 2013 14:55:09 +0100 by phpDocumentor 1.4.3