[ Index ]

PHP Cross Reference of Joomla 2.5.4 DE

title

Body

[close]

/libraries/joomla/application/ -> categories.php (summary)

(no description)

Copyright: Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
License: GNU General Public License version 2 or later; see LICENSE
File Size: 1126 lines (23 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

JCategories:: (4 methods):
  __construct()
  getInstance()
  get()
  _load()

JCategoryNode:: (16 methods):
  __construct()
  setParent()
  addChild()
  removeChild()
  getChildren()
  getParent()
  hasChildren()
  hasParent()
  setSibling()
  getSibling()
  getParams()
  getMetadata()
  getPath()
  getAuthor()
  setAllLoaded()
  getNumItems()


Class: JCategories  - X-Ref

JCategories Class.

__construct($options)   X-Ref
Class constructor

param: array  $options  Array of options

getInstance($extension, $options = array()   X-Ref
Returns a reference to a JCategories object

param: string  $extension  Name of the categories extension
param: array   $options    An array of options
return: JCategories         JCategories object

get($id = 'root', $forceload = false)   X-Ref
Loads a specific category and all its children in a JCategoryNode object

param: mixed    $id         an optional id integer or equal to 'root'
param: boolean  $forceload  True to force  the _load method to execute
return: mixed    JCategoryNode object or null if $id is not valid

_load($id)   X-Ref
Load method

param: integer  $id  Id of category to load
return: void

Class: JCategoryNode  - X-Ref

Helper class to load Categorytree

__construct($category = null, &$constructor = null)   X-Ref
Class constructor

param: array          $category      The category data.
param: JCategoryNode  &$constructor  The tree constructor.

setParent(&$parent)   X-Ref
Set the parent of this category

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

param: mixed  &$parent  JCategoryNode for the parent to be set or null
return: void

addChild(&$child)   X-Ref
Add child to this node

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

param: JNode  &$child  The child to be added.
return: void

removeChild($id)   X-Ref
Remove a specific child

param: integer  $id  ID of a category
return: void

getChildren($recursive = false)   X-Ref
Get the children of this node

param: boolean  $recursive  False by default
return: array  The children

getParent()   X-Ref
Get the parent of this node

return: mixed  JNode or null

hasChildren()   X-Ref
Test if this node has children

return: boolean  True if there is a child

hasParent()   X-Ref
Test if this node has a parent

return: boolean    True if there is a parent

setSibling($sibling, $right = true)   X-Ref
Function to set the left or right sibling of a category

param: object   $sibling  JCategoryNode object for the sibling
param: boolean  $right    If set to false, the sibling is the left one
return: void

getSibling($right = true)   X-Ref
Returns the right or left sibling of a category

param: boolean  $right  If set to false, returns the left sibling
return: mixed  JCategoryNode object with the sibling information or

getParams()   X-Ref
Returns the category parameters

return: JRegistry

getMetadata()   X-Ref
Returns the category metadata

return: JRegistry  A JRegistry object containing the metadata

getPath()   X-Ref
Returns the category path to the root category

return: array

getAuthor($modified_user = false)   X-Ref
Returns the user that created the category

param: boolean  $modified_user  Returns the modified_user when set to true
return: JUser  A JUser object containing a userid

setAllLoaded()   X-Ref
Set to load all children

return: void

getNumItems($recursive = false)   X-Ref
Returns the number of items.

param: boolean  $recursive  If false number of children, if true number of descendants
return: integer  Number of children or descendants



Generated: Tue Apr 3 11:40:28 2012 Cross-referenced by PHPXref 0.7.1