class MenuItem extends stdClass

Object representing a menu item

Properties

integer $id Primary key
integer $menutype The type of menu this item belongs to
string $title The display title of the menu item
string $alias The SEF alias of the menu item
string $note A note associated with the menu item
string $route The computed path of the menu item based on the alias field, this is populated from the path field in the #__menu table
The actual link the menu item refers to
string $type The type of link
integer $level The relative level in the tree
string $language The assigned language for this item
string $browserNav The click behaviour of the link
integer $access The access level required to view the menu item
integer $home Indicates if this menu item is the home or default page
string $img The image of the menu item
integer $template_style_id The optional template style applied to this menu item
integer $component_id The extension ID of the component this menu item is for
integer $parent_id The parent menu item in the menu tree
string $component The name of the component this menu item is for
array $tree The tree of parent menu items
array $query An array of the query string values for this item

Methods

__construct( array $data = array())

Class constructor

mixed
__get( string $name)

Method to get certain otherwise inaccessible properties from the form field object.

void
__set( string $name, mixed $value)

Method to set certain otherwise inaccessible properties of the form field object.

boolean
__isset( string $name)

Method check if a certain otherwise inaccessible properties of the form field object is set.

Registry
getParams()

Returns the menu item parameters

void
setParams( Registry|string $params)

Sets the menu item parameters

mixed
get( string $property, mixed $default = null)

Returns a property of the object or the default value if the property is not set.

mixed
set( string $property, mixed $value = null)

Modifies a property of the object, creating it if it does not already exist.

Details

__construct( array $data = array())

Class constructor

Parameters

array $data The menu item data to load

mixed __get( string $name)

Method to get certain otherwise inaccessible properties from the form field object.

Parameters

string $name The property name for which to get the value.

Return Value

mixed The property value or null.

void __set( string $name, mixed $value)

Method to set certain otherwise inaccessible properties of the form field object.

Parameters

string $name The property name for which to set the value.
mixed $value The value of the property.

Return Value

void

boolean __isset( string $name)

Method check if a certain otherwise inaccessible properties of the form field object is set.

Parameters

string $name The property name to check.

Return Value

boolean

Registry getParams()

Returns the menu item parameters

Return Value

Registry

void setParams( Registry|string $params)

Sets the menu item parameters

Parameters

Registry|string $params The data to be stored as the parameters

Return Value

void

mixed get( string $property, mixed $default = null)

Returns a property of the object or the default value if the property is not set.

Parameters

string $property The name of the property.
mixed $default The default value.

Return Value

mixed The value of the property.

mixed set( string $property, mixed $value = null)

Modifies a property of the object, creating it if it does not already exist.

Parameters

string $property The name of the property.
mixed $value The value of the property to set.

Return Value

mixed Previous value of the property.