Table of Contents

fetchButton

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage HTML Class JButton Method fetchButton Reference fetchButton() Never Work in Progress

Returns the HTML for the button. This method is defined in the final button class.

Syntax

void fetchButton ()

Examples

This method is only defined in the final button classes. It is called by the render method to retrieve the actual HTML code for the button. The following is an example of calling the fetchButton method on a JButtonStandard button.

Example

$bar =& new JToolBar( 'My ToolBar' );
$button =& $bar->loadButtonType( 'Standard' );
echo $button->fetchButton( 'Standard', 'send', 'Activate', 'activate', false );

might produce:

Result

<a onclick="javascript:submitbutton('activate')" class="toolbar">

<div class="icon-32-send" title="Activate" type="Standard">
</div>
Activate
</a>