Gets the button’s CSS ID. The value returned is a concatenation of the parent’s name property and the specified $name parameter.
string fetchId ( $type, $name, $text, $task, $list, $hideMenu )
| $type | string | is a string containing the button type. This parameter should usually be ‘Standard’. This parameter is optional and if omitted defaults to ‘Standard’. |
| $name | string | is a string containing the name of the button. This parameter is output in the ID string. |
| $text | string | is a string containing the text to display below the button. This parameter is not used by this method. |
| $task | string | is a string containing the task that the button will execute. This parameter is not used by this method. |
| $list | boolean | is a boolean specifying whether or not the button should ensure that an item is selected from the admin list. This parameter is not used by this method. |
| $hideMenu | boolean | is a boolean specifying whether or not the main menu should be hidden before the submitbutton function is called. This parameter is not used by this method. |
Example
$bar =& new JToolBar( 'My ToolBar' );
$button =& $bar->loadButtonType( 'Standard' );
echo $button->fetchId( 'Standard', 'save', 'Save', 'save', true, true );
might produce:
Discussion