API16

JToolBar/renderButton: Difference between revisions

From Joomla! Documentation

m clean up
m preparing for archive only
 
Line 4: Line 4:




{{subst:Description:JToolBar/renderButton}}
 


===Syntax===
===Syntax===
Line 46: Line 46:




{{subst:SeeAlso:JToolBar/renderButton}}
 


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=renderButton
  category=renderButton
  category=JToolBar
  category=JToolBar
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*
  format= ,,,
  format= ,,,
</dpl>
</dpl>

Latest revision as of 02:13, 25 March 2017

Description

Render a parameter type.



Syntax

renderButton(&$node)
Parameter Name Default Value Description
&$node A param tag node.

Returns

array Any array of the label, the form element and the tooltip.

Defined in

libraries/joomla/html/toolbar.php

Importing

jimport( 'joomla.html.toolbar' );

Source Body

public function renderButton(&$node)
{
        // Get the button type.
        $type = $node[0];

        $button = &$this->loadButtonType($type);

        // Check for error.
        if ($button === false) {
                return JText::_('Button not defined for type').' = '.$type;
        }
        return $button->render($node);
}



Examples

Code Examples