Table of Contents

fetchId

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

Gets the button’s CSS ID. The value returned is a concatenation of the parent’s name property and the specified ID parameter.

Syntax

string fetchId ( $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 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 is optional and if omitted defaults to ‘custom’.

Examples

Example

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

might produce:

Result

My ToolBar-example