JMenu/getActive: Difference between revisions
From Joomla! Documentation
New page: ===Description===
Get menu item by id
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>
</span>
... |
m clean up |
||
| Line 2: | Line 2: | ||
Get menu item by id | Get menu item by id | ||
{{Description:JMenu/getActive}} | |||
{{subst:Description:JMenu/getActive}} | |||
===Syntax=== | ===Syntax=== | ||
| Line 33: | Line 31: | ||
</source> | </source> | ||
{{subst:SeeAlso:JMenu/getActive}} | |||
{{SeeAlso:JMenu/getActive}} | |||
===Examples=== | ===Examples=== | ||
Revision as of 14:14, 24 March 2017
Description
Get menu item by id
{{subst:Description:JMenu/getActive}}
Syntax
getActive()
Returns
object The item object
Defined in
libraries/joomla/application/menu.php
Importing
jimport( 'joomla.application.menu' );
Source Body
public function getActive()
{
if ($this->_active) {
$item = &$this->_items[$this->_active];
return $item;
}
return null;
}
{{subst:SeeAlso:JMenu/getActive}}
Examples
<CodeExamplesForm />