Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe CategoryNode
+ Graphe d'héritage de CategoryNode:

Fonctions membres publiques

 __construct ($category=null, $constructor=null)
 
 setParent (NodeInterface $parent)
 
getChildren ($recursive=false)
 
 getSibling ($right=true)
 
 getParams ()
 
 getMetadata ()
 
 getPath ()
 
 getAuthor ($modifiedUser=false)
 
 setAllLoaded ()
 
 getNumItems ($recursive=false)
 
- Fonctions membres publiques hérités de CMSObject
 __construct ($properties=null)
 
 __toString ()
 
 def ($property, $default=null)
 
 get ($property, $default=null)
 
 getProperties ($public=true)
 
 getError ($i=null, $toString=true)
 
 getErrors ()
 
 set ($property, $value=null)
 
 setProperties ($properties)
 
 setError ($error)
 
- Fonctions membres publiques hérités de NodeInterface
 addChild (NodeInterface $child)
 
 removeChild (NodeInterface $child)
 
 setSibling (NodeInterface $sibling, $right=true)
 
- Fonctions membres publiques hérités de ImmutableNodeInterface
 getParent ()
 
 getRoot ()
 
 hasChildren ()
 
 hasParent ()
 

Champs de données

 $id = null
 
 $asset_id = null
 
 $parent_id = null
 
 $lft = null
 
 $rgt = null
 
 $level = null
 
 $extension = null
 
 $title = null
 
 $alias = null
 
 $description = null
 
 $published = null
 
 $checked_out = null
 
 $checked_out_time = null
 
 $access = null
 
 $params = null
 
 $metadesc = null
 
 $metakey = null
 
 $metadata = null
 
 $created_user_id = null
 
 $created_time = null
 
 $modified_user_id = null
 
 $modified_time = null
 
 $hits = null
 
 $language = null
 
 $numitems = null
 
 $childrennumitems = null
 
 $slug = null
 
 $assets = null
 

Attributs protégés

 $_path = array()
 
 $_allChildrenloaded = false
 
 $_constructor = null
 
- Attributs protégés hérités de CMSObject
 $_errors = array()
 

Description détaillée

Helper class to load Categorytree

Depuis
1.6

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $category = null,
  $constructor = null 
)

Class constructor

Paramètres
array$categoryThe category data.
Categories$constructorThe tree constructor.
Depuis
1.6

Références $category.

Documentation des fonctions membres

◆ getAuthor()

getAuthor (   $modifiedUser = false)

Returns the user that created the category

Paramètres
boolean$modifiedUserReturns the modified_user when set to true
Renvoie
A User object containing a userid
Depuis
1.6

Références Factory\getUser().

◆ getChildren()

& getChildren (   $recursive = false)

Get the children of this node

Paramètres
boolean$recursiveFalse by default
Renvoie
CategoryNode[] The children
Depuis
1.6

Implémente ImmutableNodeInterface.

Références Joomla\CMS\Tree\$_children, $items, et $temp.

◆ getMetadata()

getMetadata ( )

Returns the category metadata

Renvoie
Registry A Registry object containing the metadata
Depuis
1.6

◆ getNumItems()

getNumItems (   $recursive = false)

Returns the number of items.

Paramètres
boolean$recursiveIf false number of children, if true number of descendants
Renvoie
integer Number of children or descendants
Depuis
1.6

Références $count, et Joomla\CMS\Tree\getChildren().

◆ getParams()

getParams ( )

Returns the category parameters

Renvoie
Registry
Depuis
1.6

Références $params.

◆ getPath()

getPath ( )

Returns the category path to the root category

Renvoie
array
Depuis
1.6

◆ getSibling()

getSibling (   $right = true)

Returns the right or left sibling of a category

Paramètres
boolean$rightIf set to false, returns the left sibling
Renvoie
CategoryNode|null CategoryNode object with the sibling information or null if there is no sibling on that side.
Depuis
1.6

Implémente ImmutableNodeInterface.

Références Joomla\CMS\Tree\$_leftSibling, Joomla\CMS\Tree\$_rightSibling, et $temp.

◆ setAllLoaded()

setAllLoaded ( )

Set to load all children

Renvoie
void
Depuis
1.6

◆ setParent()

setParent ( NodeInterface  $parent)

Set the parent of this category

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

Paramètres
CategoryNode | null$parentCategoryNode for the parent to be set or null
Renvoie
void
Depuis
1.6

Implémente NodeInterface.

Références $id, $key, et $this.

Documentation des champs

◆ $_allChildrenloaded

$_allChildrenloaded = false
protected

◆ $_constructor

$_constructor = null
protected

◆ $_path

$_path = array()
protected

◆ $access

$access = null

◆ $alias

$alias = null

◆ $asset_id

$asset_id = null

◆ $assets

$assets = null

◆ $checked_out

$checked_out = null

◆ $checked_out_time

$checked_out_time = null

◆ $childrennumitems

$childrennumitems = null

◆ $created_time

$created_time = null

◆ $created_user_id

$created_user_id = null

◆ $description

◆ $extension

◆ $hits

$hits = null

◆ $id

$id = null

◆ $language

◆ $level

$level = null

◆ $lft

$lft = null

◆ $metadata

$metadata = null

◆ $metadesc

$metadesc = null

◆ $metakey

$metakey = null

◆ $modified_time

$modified_time = null

◆ $modified_user_id

$modified_user_id = null

◆ $numitems

$numitems = null

◆ $params

$params = null

◆ $parent_id

$parent_id = null

◆ $published

$published = null

◆ $rgt

$rgt = null

◆ $slug

$slug = null

◆ $title

$title = null

La documentation de cette classe a été générée à partir du fichier suivant :