MenuItem
Extends stdClassObject representing a menu item
| since |
3.7.0 |
|---|---|
| note |
This class will no longer extend stdClass in Joomla 4 |
| package |
Joomla CMS |
Methods
__construct
Class constructor
__construct(array data = array()) : mixed
| since |
3.7.0 |
|---|
Arguments
- data
arrayThe menu item data to load
Response
mixed
__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
stringThe property name for which to get the value.
Response
mixedThe property value or null.
__isset
Method check if a certain otherwise inaccessible properties of the form field object is set.
__isset(string name) : bool
| since |
3.7.1 |
|---|---|
| deprecated |
4.0 Deprecated without replacement |
Arguments
- name
stringThe property name to check.
Response
bool
__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
stringThe property name for which to set the value.- value
mixedThe 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
stringThe name of the property.- default
mixedThe default value.
Response
mixedThe value of the property.
getParams
Returns the menu item parameters
getParams() : \Joomla\Registry\Registry
| since |
3.7.0 |
|---|
Response
\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
stringThe name of the property.- value
mixedThe value of the property to set.
Response
mixedPrevious 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|stringThe data to be stored as the parameters
Properties
id
Primary key
| since |
3.7.0 |
|---|
Type(s)
int
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)
int
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)
int
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)
int
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)
int
component_id
The extension ID of the component this menu item is for
| since |
3.7.0 |
|---|
Type(s)
int
parent_id
The parent menu item in the menu tree
| since |
3.7.0 |
|---|
Type(s)
int
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