API15

JButtonHelp/fetchButton: Difference between revisions

From Joomla! Documentation

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


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

Latest revision as of 00:20, 25 March 2017

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

Syntax

fetchButton($type='Help', $ref= '', $com=false)
Parameter Name Default Value Description
$type 'Help'
$ref
$com false

Defined in

libraries/joomla/html/toolbar/button/help.php

Importing

jimport( 'joomla.html.toolbar.button.help' );

Source Body

function fetchButton( $type='Help', $ref = '', $com = false )
{
        $text   = JText::_('Help');
        $class  = $this->fetchIconClass('help');
        $doTask = $this->_getCommand($ref, $com);

        $html   = "<a href=\"#\" onclick=\"$doTask\" class=\"toolbar\">\n";
        $html .= "<span class=\"$class\" title=\"$text\">\n";
        $html .= "</span>\n";
        $html   .= "$text\n";
        $html   .= "</a>\n";

        return $html;
}


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

Examples

Code Examples