Back to Joomla project (class list)

Class CategoryNode - list of methods

Helper class to load Categorytree

Extends

Extends

Package: Joomla\CMS\Categories
Copyright: (C) 2017 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Categories/CategoryNode.php
Project: Joomla

Method Summary

public
(mixed $category = null, mixed $constructor = null)

Class constructor
Parameters
  • array $category The category data.
  • \Joomla\CMS\Categories\Categories $constructor The tree constructor.
Since
  • 1.6
Show source code of this method: __construct Source Code

public void
(\Joomla\CMS\Tree\NodeInterface $parent)

Set the parent of this category
Parameters
  • \Joomla\CMS\Categories\CategoryNode|null $parent CategoryNode for the parent to be set or null
Returns
  • void
Since
  • 1.6
Show source code of this method: setParent Source Code

public \Joomla\CMS\Categories\CategoryNode[]
(mixed $recursive = false)

Get the children of this node
Parameters
  • bool $recursive False by default
Returns
  • \Joomla\CMS\Categories\CategoryNode[] The children
Since
  • 1.6
Show source code of this method: getChildren Source Code

public \Joomla\CMS\Categories\CategoryNode|null
(mixed $right = true)

Returns the right or left sibling of a category
Parameters
  • bool $right If set to false, returns the left sibling
Returns
  • \Joomla\CMS\Categories\CategoryNode|null CategoryNode object with the sibling information or null if there is no sibling on that side.
Since
  • 1.6
Show source code of this method: getSibling Source Code

public \Joomla\Registry\Registry
()

Returns the category parameters
Returns
  • \Joomla\Registry\Registry
Since
  • 1.6
Show source code of this method: getParams Source Code

public \Joomla\Registry\Registry
()

Returns the category metadata
Returns
  • \Joomla\Registry\Registry A Registry object containing the metadata
Since
  • 1.6
Show source code of this method: getMetadata Source Code

public array
()

Returns the category path to the root category
Returns
  • array
Since
  • 1.6
Show source code of this method: getPath Source Code

public \Joomla\CMS\User\User
(mixed $modifiedUser = false)

Returns the user that created the category
Parameters
  • bool $modifiedUser Returns the modified_user when set to true
Returns
  • \Joomla\CMS\User\User A User object containing a userid
Since
  • 1.6
Show source code of this method: getAuthor Source Code

public void
()

Set to load all children
Returns
  • void
Since
  • 1.6
Show source code of this method: setAllLoaded Source Code

public int
(mixed $recursive = false)

Returns the number of items.
Parameters
  • bool $recursive If false number of children, if true number of descendants
Returns
  • int Number of children or descendants
Since
  • 1.6
Show source code of this method: getNumItems Source Code

Properties Summary

public int
$id
Primary key
Since
  • 1.6
public int
$asset_id
The id of the category in the asset table
Since
  • 1.6
public int
$parent_id
The id of the parent of category in the asset table, 0 for category root
Since
  • 1.6
public int
$lft
The lft value for this category in the category tree
Since
  • 1.6
public int
$rgt
The rgt value for this category in the category tree
Since
  • 1.6
public int
$level
The depth of this category's position in the category tree
Since
  • 1.6
public int
$extension
The extension this category is associated with
Since
  • 1.6
public string
$title
The menu title for the category (a short name)
Since
  • 1.6
public string
$alias
The the alias for the category
Since
  • 1.6
public string
$description
Description of the category.
Since
  • 1.6
public bool
$published
The publication status of the category
Since
  • 1.6
public bool
$checked_out
Whether the category is or is not checked out
Since
  • 1.6
public string
$checked_out_time
The time at which the category was checked out
Since
  • 1.6
public int
$access
Access level for the category
Since
  • 1.6
public string
$params
JSON string of parameters
Since
  • 1.6
public string
$metadesc
Metadata description
Since
  • 1.6
public string
$metakey
Key words for metadata
Since
  • 1.6
public string
$metadata
JSON string of other metadata
Since
  • 1.6
public int
$created_user_id
The ID of the user who created the category
Since
  • 1.6
public string
$created_time
The time at which the category was created
Since
  • 1.6
public int
$modified_user_id
The ID of the user who last modified the category
Since
  • 1.6
public string
$modified_time
The time at which the category was modified
Since
  • 1.6
public int
$hits
Number of times the category has been viewed
Since
  • 1.6
public string
$language
The language for the category in xx-XX format
Since
  • 1.6
public int
$numitems
Number of items in this category or descendants of this category
Since
  • 1.6
public int
$childrennumitems
Number of children items
Since
  • 1.6
public string
$slug
Slug for the category (used in URL)
Since
  • 1.6
public array
$assets
Array of assets
Since
  • 1.6
protected array
$_path
Path from root to this category
Since
  • 1.6
protected bool
$_allChildrenloaded
Flag if all children have been loaded
Since
  • 1.6
protected \Joomla\CMS\Categories\Categories
$_constructor
Constructor of this tree
Since
  • 1.6

Tags Summary

Since
1.6