API15

JMenu/getActive: Difference between revisions

From Joomla! Documentation

m removing red link to edit, no existant pages
m preparing for archive only
 
Line 40: Line 40:


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=getActive
  category=getActive
  category=JMenu
  category=JMenu
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*

Latest revision as of 00:57, 25 March 2017

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