API15

API15:JMenu/getActive

From Joomla! Documentation

Description

Get menu item by id

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax

& getActive()


Returns

object The item object

Defined in

libraries/joomla/application/menu.php

Importing

jimport( 'joomla.application.menu' );

Source Body

function &getActive()
{
        if ($this->_active) {
                $item =& $this->_items[$this->_active];
                return $item;
        }

        $result = null;
        return $result;
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

Code Examples