API16

API16:JButtonConfirm/fetchButton

From Joomla! Documentation

Revision as of 22:52, 22 March 2010 by Doxiki (talk | contribs) (New page: <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki> </span> {{Description:JButtonConfir...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

[Edit Descripton]

Template:Description:JButtonConfirm/fetchButton

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;
}

[Edit See Also] Template:SeeAlso:JButtonConfirm/fetchButton

Examples

<CodeExamplesForm />