Component

Extends Node

A Component type of node for MenuTree

deprecated
see Node
since

3.8.0

deprecated

4.0 Use Joomla\CMS\Menu\MenuItem

package

Joomla CMS

Methods

__construct

Constructor

__construct() : mixed
inherited deprecated
since

3.8.0

deprecated

4.0 Use Joomla\CMS\Menu\MenuItem

Response

mixed

addChild

Add child to this node

addChild(\Joomla\CMS\Menu\Node child) : \Joomla\CMS\Menu\Node
inherited deprecated

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

since

3.8.0

deprecated

4.0 Use Joomla\CMS\Menu\MenuItem

Arguments

child

\Joomla\CMS\Menu\NodeThe child to be added

Response

\Joomla\CMS\Menu\NodeThe new added child

get

Get an attribute value

get(string name) : mixed
inherited deprecated
since

3.8.0

deprecated

4.0 Use Joomla\CMS\Menu\MenuItem

Arguments

name

stringThe attribute name

Response

mixed

getChildren

Get the children of this node

getChildren() : \Joomla\CMS\Menu\Node[]
inherited deprecated
since

3.8.0

deprecated

4.0 Use Joomla\CMS\Menu\MenuItem

Response

\Joomla\CMS\Menu\Node[]The children

getLevel

Find the current node depth in the tree hierarchy

getLevel() : int
inherited deprecated
since

3.8.0

deprecated

4.0 Use Joomla\CMS\Menu\MenuItem

Response

intThe node level in the hierarchy, where ROOT == 0, First level menu item == 1, and so on.

getParam

Get the param value from the node params

getParam(string key) : mixed
inherited deprecated
since

3.8.0

deprecated

4.0 Use Joomla\CMS\Menu\MenuItem

Arguments

key

stringThe param name

Response

mixed

getParent

Get the parent of this node

getParent() : \Joomla\CMS\Menu\Node
inherited deprecated
since

3.8.0

deprecated

4.0 Use Joomla\CMS\Menu\MenuItem

Response

\Joomla\CMS\Menu\NodeThe Node object's parent or null for no parent

hasChildren

Test if this node has children

hasChildren() : bool
inherited deprecated
since

3.8.0

deprecated

4.0 Use Joomla\CMS\Menu\MenuItem

Response

bool

hasParent

Test if this node has a parent

hasParent() : bool
inherited deprecated
since

3.8.0

deprecated

4.0 Use Joomla\CMS\Menu\MenuItem

Response

boolTrue if there is a parent

isRoot

Check whether the object instance node is the root node

isRoot() : bool
inherited deprecated
since

3.8.0

deprecated

4.0 Use Joomla\CMS\Menu\MenuItem

Response

bool

removeChild

Remove a child from this node

removeChild(\Joomla\CMS\Menu\Node child) : void
inherited deprecated

If the child exists it is unset

since

3.8.0

deprecated

4.0 Use Joomla\CMS\Menu\MenuItem

Arguments

child

\Joomla\CMS\Menu\NodeThe child to be added

setActive

Set the active state on or off

setActive(bool active) : void
inherited deprecated
since

3.8.0

deprecated

4.0 Use Joomla\CMS\Menu\MenuItem

Arguments

active

boolThe new active state

setParams

set the params array

setParams(\Joomla\Registry\Registry params) : void
inherited deprecated
since

3.8.0

deprecated

4.0 Use Joomla\CMS\Menu\MenuItem

Arguments

params

\Joomla\Registry\RegistryThe params attributes

Properties

title

Node Title

since

3.8.0

Type(s)

string

element

The component name for this node link

since

3.8.0

Type(s)

string

target

Link Target

since

3.8.0

Type(s)

string

icon

Link title icon

since

3.8.0

Type(s)

string

id

Node Id

inherited
since

3.8.0

Type(s)

string

class

CSS Class for node

inherited
since

3.8.0

Type(s)

string

active

Whether this node is active

inherited
since

3.8.0

Type(s)

bool

params

Additional custom node params

inherited
since

3.8.0

Type(s)

\Joomla\Registry\Registry

parent

Parent node object

inherited
since

3.8.0

Type(s)

\Joomla\CMS\Menu\Node

children

Array of Children node objects

inherited
since

3.8.0

Type(s)

\Joomla\CMS\Menu\Node[]