MenuItem
Extends \stdClassObject representing a menu item
since |
3.7.0 |
---|---|
note |
This class will no longer extend stdClass in Joomla 4 |
Methods
__construct
Class constructor
__construct(array $data = array())
since |
3.7.0 |
---|
Arguments
- $data
array
The menu item data to load
__get
Method to get certain otherwise inaccessible properties from the form field object.
__get(string $name) : mixed
since |
3.7.0 |
---|---|
deprecated |
4.0 Access the item parameters through the |
Arguments
- $name
string
The property name for which to get the value.
Response
mixed
The property value or null.
__isset
Method check if a certain otherwise inaccessible properties of the form field object is set.
__isset(string $name) : boolean
since |
3.7.1 |
---|---|
deprecated |
4.0 Deprecated without replacement |
Arguments
- $name
string
The property name to check.
Response
boolean
__set
Method to set certain otherwise inaccessible properties of the form field object.
__set(string $name, mixed $value) : void
since |
3.7.0 |
---|---|
deprecated |
4.0 Set the item parameters through the |
Arguments
- $name
string
The property name for which to set the value.- $value
mixed
The value of the property.
get
Returns a property of the object or the default value if the property is not set.
get(string $property, mixed $default = null) : mixed
since |
3.7.0 |
---|---|
deprecated |
4.0 |
Arguments
- $property
string
The name of the property.- $default
mixed
The default value.
Response
mixed
The value of the property.
getParams
Returns the menu item parameters
getParams() : \Joomla\Registry\Registry
set
Modifies a property of the object, creating it if it does not already exist.
set(string $property, mixed $value = null) : mixed
since |
3.7.0 |
---|---|
deprecated |
4.0 |
Arguments
- $property
string
The name of the property.- $value
mixed
The value of the property to set.
Response
mixed
Previous value of the property.
setParams
Sets the menu item parameters
setParams(\Joomla\Registry\Registry|string $params) : void
since |
3.7.0 |
---|
Arguments
- $params
\Joomla\Registry\Registry|string
The data to be stored as the parameters
Properties
id
Primary key
since |
3.7.0 |
---|
Type(s)
integer
title
The display title of the menu item
since |
3.7.0 |
---|
Type(s)
string
alias
The SEF alias of the menu item
since |
3.7.0 |
---|
Type(s)
string
note
A note associated with the menu item
since |
3.7.0 |
---|
Type(s)
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
since |
3.7.0 |
---|
Type(s)
string
link
The actual link the menu item refers to
since |
3.7.0 |
---|
Type(s)
string
type
The type of link
since |
3.7.0 |
---|
Type(s)
string
level
The relative level in the tree
since |
3.7.0 |
---|
Type(s)
integer
language
The assigned language for this item
since |
3.7.0 |
---|
Type(s)
string
access
The access level required to view the menu item
since |
3.7.0 |
---|
Type(s)
integer
params
The menu item parameters
since |
3.7.0 |
---|---|
note |
This field is protected to require reading this field to proxy through the getter to convert the params to a Registry instance |
Type(s)
string|\Joomla\Registry\Registry
home
Indicates if this menu item is the home or default page
since |
3.7.0 |
---|
Type(s)
integer
img
The image of the menu item
since |
3.7.0 |
---|
Type(s)
string
template_style_id
The optional template style applied to this menu item
since |
3.7.0 |
---|
Type(s)
integer
component_id
The extension ID of the component this menu item is for
since |
3.7.0 |
---|
Type(s)
integer
parent_id
The parent menu item in the menu tree
since |
3.7.0 |
---|
Type(s)
integer
component
The name of the component this menu item is for
since |
3.7.0 |
---|
Type(s)
string
tree
The tree of parent menu items
since |
3.7.0 |
---|
Type(s)
array
query
An array of the query string values for this item
since |
3.7.0 |
---|
Type(s)
array