Back to StandardButton class

Method fetchButton

public string
fetchButton
(mixed $type = 'Standard', mixed $name = '', mixed $text = '', mixed $task = '', mixed $list = true, mixed $formId = null)
Fetch the HTML for the button
Parameters
  • string $type Unused string.
  • string $name The name of the button icon class.
  • string $text Button text.
  • string $task Task associated with the button.
  • bool $list True to allow lists
  • string $formId The id of action form.
Returns
  • string HTML string for the button
Since
  • 3.0
Deprecated
  • 5.0

Method fetchButton - Source code

/**
 * Fetch the HTML for the button
 *
 * @param   string   $type    Unused string.
 * @param   string   $name    The name of the button icon class.
 * @param   string   $text    Button text.
 * @param   string   $task    Task associated with the button.
 * @param   boolean  $list    True to allow lists
 * @param   string   $formId  The id of action form.
 *
 * @return  string  HTML string for the button
 *
 * @since   3.0
 *
 * @deprecated  5.0 Use render() instead.
 */
public function fetchButton($type = 'Standard', $name = '', $text = '', $task = '', $list = true, $formId = null)
{
    $this->name($name)->text($text)->task($task)->listCheck($list);
    if ($formId !== null) {
        $this->form($formId);
    }
    return $this->renderButton($this->options);
}