Back to CoreButtonsTrait class

Method cancel

public \Joomla\CMS\Toolbar\Button\StandardButton
cancel
(string $task, string $text = 'JTOOLBAR_CLOSE')
Writes a cancel button and invokes a cancel operation (eg a checkin).
Parameters
  • string $task The task name of this button.
  • string $text The text of this button.
Returns
  • \Joomla\CMS\Toolbar\Button\StandardButton
Since
  • 4.0.0

Method cancel - Source code

/**
 * Writes a cancel button and invokes a cancel operation (eg a checkin).
 *
 * @param   string  $task  The task name of this button.
 * @param   string  $text  The text of this button.
 *
 * @return  StandardButton
 *
 * @since   4.0.0
 */
public function cancel(string $task, string $text = 'JTOOLBAR_CLOSE') : StandardButton
{
    return $this->standardButton('cancel', $text)->task($task);
}