Back to ConfirmButton class

Method fetchButton

public string
fetchButton
(mixed $type = 'Confirm', mixed $msg = '', mixed $name = '', mixed $text = '', mixed $task = '', mixed $list = true, mixed $hideMenu = false)
Fetch the HTML for the button
Parameters
  • string $type Unused string.
  • string $msg Message to render
  • string $name Name to be used as apart of the id
  • string $text Button text
  • string $task The task associated with the button
  • bool $list True to allow use of lists
  • bool $hideMenu True to hide the menu on click
Returns
  • string HTML string for the button
Since
  • 3.0
Deprecated
  • 5.0
Class: ConfirmButton
Project: Joomla

Method fetchButton - Source code

/**
 * Fetch the HTML for the button
 *
 * @param   string   $type      Unused string.
 * @param   string   $msg       Message to render
 * @param   string   $name      Name to be used as apart of the id
 * @param   string   $text      Button text
 * @param   string   $task      The task associated with the button
 * @param   boolean  $list      True to allow use of lists
 * @param   boolean  $hideMenu  True to hide the menu on click
 *
 * @return  string   HTML string for the button
 *
 * @since   3.0
 *
 * @deprecated  5.0 Use render() instead.
 */
public function fetchButton($type = 'Confirm', $msg = '', $name = '', $text = '', $task = '', $list = true, $hideMenu = false)
{
    $this->name($name)->text($text)->listCheck($list)->message($msg)->task($task);
    return $this->renderButton($this->options);
}