API15

Difference between revisions of "JMenu/getParams"

From Joomla! Documentation

< API15:JMenu
(New page: ===Description=== Gets the parameter object for a certain menu item <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton...)
 
m (removing red link to edit, no existant pages)
(One intermediate revision by one other user not shown)
Line 3: Line 3:
  
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[Description:JMenu/getParams|Edit Descripton]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
  
{{Description:JMenu/getParams}}
+
<! removed transcluded page call, red link never existed >
  
 
===Syntax===
 
===Syntax===
<source lang="php">getParams($id)</source>
+
<source lang="php">& getParams($id)</source>
  
 
  {| class="wikitable"
 
  {| class="wikitable"
Line 23: Line 23:
  
 
===Returns===
 
===Returns===
object A JParameter object  
+
object A object  
  
 
===Defined in===
 
===Defined in===
Line 32: Line 32:
 
===Source Body===
 
===Source Body===
 
<source lang="php">
 
<source lang="php">
public function getParams($id)
+
function &getParams($id)
 
{
 
{
 
         $ini = '';
 
         $ini = '';
         if ($menu = &$this->getItem($id)) {
+
         if ($menu =& $this->getItem($id)) {
 
                 $ini = $menu->params;
 
                 $ini = $menu->params;
 
         }
 
         }
 +
        $result = new JParameter( $ini );
  
         return new JParameter($ini);
+
         return $result;
 
}
 
}
 
</source>
 
</source>
  
 
<span class="editsection" style="font-size:76%;">
 
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>[[SeeAlso:JMenu/getParams|Edit See Also]]<nowiki>]</nowiki>
+
<nowiki>[<! removed edit link to red link >]</nowiki>
 
</span>
 
</span>
{{SeeAlso:JMenu/getParams}}
+
<! removed transcluded page call, red link never existed >
  
 
===Examples===
 
===Examples===
Line 59: Line 60:
 
  format= ,,,
 
  format= ,,,
 
</dpl>
 
</dpl>
 +
[[Category:Archived pages API15]]

Revision as of 13:36, 12 May 2013

The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description[edit]

Gets the parameter object for a certain menu item

[<! removed edit link to red link >]

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

Syntax[edit]

& getParams($id)
Parameter Name Default Value Description
$id The item id

Returns[edit]

object A object

Defined in[edit]

libraries/joomla/application/menu.php

Importing[edit]

jimport( 'joomla.application.menu' );

Source Body[edit]

function &getParams($id)
{
        $ini = '';
        if ($menu =& $this->getItem($id)) {
                $ini = $menu->params;
        }
        $result = new JParameter( $ini );

        return $result;
}

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

Examples[edit]

<CodeExamplesForm />