JMenu/getActive: Difference between revisions
From Joomla! Documentation
m clean up |
m preparing for archive only |
||
| Line 4: | Line 4: | ||
===Syntax=== | ===Syntax=== | ||
| Line 32: | Line 32: | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=getActive | category=getActive | ||
category=JMenu | category=JMenu | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
Latest revision as of 01:54, 25 March 2017
Description
Get menu item by id
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;
}
Examples
Code Examples