| API | Package | Subpackage | Class | Method | Reference | Last reviewed | Doc status |
|---|---|---|---|---|---|---|---|
Home |
Joomla.Framework |
HTML |
JButtonHelp |
fetchButton |
fetchButton() |
Never | Work in Progress |
Returns the HTML code for the button. The created button will include code to open up a popup window with the specified help screen when it is clicked. For more information on how the $ref and $com parameters function (they are used to derive the URL of the target help file), see the JHelp::createURL method. The button will include a <div> cell whose class is determined by the fetchIconClass method called with ‘help’ as its parameter. This class is defined in the standard administrator template. If this class is used in the frontend, this class should be defined and any images used should be included.
void fetchButton ( $type, $ref, $com )
| $type | string | is a string containing the button type. This parameter should normally be ‘Help’. This parameter is optional and if omitted defaults to ‘Help’. |
| $ref | string | is a string containing the name of the popup file (excluding the file extension for an xml file). For more information see the JHelp::createURL method. |
| $com | boolean | is a flag which specifies whether or not to use the help file in the component directory. For more information see the JHelp::createURL method. |
Example
$bar =& new JToolBar( 'My ToolBar' ); $button =& $bar->loadButtonType( 'Help' ); echo $button->fetchButton( 'Help', 'screen.config', true );
might produce:
Result
<a onclick="popupWindow('http://127.0.0.1/joomla15/components/com_document/help/screen.config.html', 'Help', 640, 480, 1)" class="toolbar"> <div class="icon-32-help" title="Help" type="Help"> </div> Help </a>
In the standard administrator’s template, this button looks like: