Support Joomla!

references:joomla.framework:html:jbuttoncustom-fetchbutton

Table of Contents

fetchButton

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

Returns the HTML code for the button. The output is actually directly copied from the $html parameter. Therefore the HTML produced by the custom button can be easily modified.

This method returns the value of the $html parameter.

Syntax

void fetchButton ( $type, $html, $id )

$type string is a string containing the type of button. For a custom button, this would normally be equal to ‘Custom’. This parameter has no effect on the output of this method. This parameter is optional and if omitted defaults to ‘Custom’.
$html string is a string containing the HTML code for the button. The method returns the value of this parameter.
$id string is a string containing the ID of the button. This parameter has no effect on the output of this method. This parameter is optional and if omitted defaults to ‘custom’.

Examples

Example

$bar =& new JToolBar( 'My ToolBar' );
$button =& $bar->loadButtonType( 'Custom' );
echo $button->fetchButton( 'Custom', '<a href="http://www.joomla.org">Joomla!</a>', 'example' );

mightproduce:

Result

<a href="http://www.joomla.org">Joomla!</a>

Discussion

Full name:
E-Mail:
 
references/joomla.framework/html/jbuttoncustom-fetchbutton.txt (505 views) · Last modified: 2007/09/22 02:47