Back to ToolbarHelper class

Method cancel

public static void
cancel
(mixed $task = 'cancel', mixed $alt = 'JTOOLBAR_CANCEL')
Writes a cancel button and invokes a cancel operation (eg a checkin).
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
Returns
  • void
Since
  • 1.5
Class: ToolbarHelper
Project: Joomla

Method cancel - Source code

/**
 * Writes a cancel button and invokes a cancel operation (eg a checkin).
 *
 * @param   string  $task  An override for the task.
 * @param   string  $alt   An override for the alt text.
 *
 * @return  void
 *
 * @since   1.5
 */
public static function cancel($task = 'cancel', $alt = 'JTOOLBAR_CANCEL')
{
    $bar = Toolbar::getInstance('toolbar');
    // Add a cancel button.
    $bar->appendButton('Standard', 'cancel', $alt, $task, false);
}