API16

JApplication/getMenu: Difference between revisions

From Joomla! Documentation

m removing red link to edit, no existant pages
m clean up
Line 2: Line 2:
Returns the application JPathway object.
Returns the application JPathway object.


<span class="editsection" style="font-size:76%;">
 
<nowiki>[<! removed edit link to red link >]</nowiki>
</span>


<! removed transcluded page call, red link never existed >
<! removed transcluded page call, red link never existed >
Line 51: Line 49:
</source>
</source>


<span class="editsection" style="font-size:76%;">
 
<nowiki>[<! removed edit link to red link >]</nowiki>
</span>
<! removed transcluded page call, red link never existed >
<! removed transcluded page call, red link never existed >



Revision as of 13:37, 24 March 2017

Description

Returns the application JPathway object.


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

Syntax

getMenu($name=null, $options=array())
Parameter Name Default Value Description
$name null $options An optional associative array of configuration settings.
$options array()

Returns

object .

Defined in

libraries/joomla/application/application.php

Importing

jimport( 'joomla.application.application' );

Source Body

public function getMenu($name = null, $options = array())
{
        if (!isset($name)) {
                $name = $this->_name;
        }

        jimport('joomla.application.menu');
        $menu = &JMenu::getInstance($name, $options);
        if (JError::isError($menu)) {
                return null;
        }
        return $menu;
}


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

Examples

<CodeExamplesForm />