JApplication/getMenu: Difference between revisions
From Joomla! Documentation
m clean up |
m preparing for archive only |
||
| Line 53: | Line 53: | ||
===Examples=== | ===Examples=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=getMenu | category=getMenu | ||
category=JApplication | category=JApplication | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
Latest revision as of 01:17, 25 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
Code Examples