API16

JButtonConfirm/fetchButton: Difference between revisions

From Joomla! Documentation

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


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

Latest revision as of 01:20, 25 March 2017

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

Syntax

fetchButton($type='Confirm', $msg='', $name= '', $text= '', $task= '', $list=true, $hideMenu=false)
Parameter Name Default Value Description
$type 'Confirm'
$msg
$name
$text
$task
$list true
$hideMenu false

Defined in

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

Importing

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

Source Body

public function fetchButton($type='Confirm', $msg='', $name = '', $text = '', $task = '', $list = true, $hideMenu = false)
{
        $text   = JText::_($text);
        $msg    = JText::_($msg, true);
        $class  = $this->fetchIconClass($name);
        $doTask = $this->_getCommand($msg, $name, $task, $list);

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

        return $html;
}


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

Examples

Code Examples