Back to CoreButtonsTrait class

Method delete

public \Joomla\CMS\Toolbar\Button\ConfirmButton
delete
(string $task, string $text = 'JTOOLBAR_DELETE')
Writes a common 'delete' button.
Parameters
  • string $task The task name of this button.
  • string $text The text of this button.
Returns
  • \Joomla\CMS\Toolbar\Button\ConfirmButton
Since
  • 4.0.0

Method delete - Source code

/**
 * Writes a common 'delete' button.
 *
 * @param   string  $task  The task name of this button.
 * @param   string  $text  The text of this button.
 *
 * @return  ConfirmButton
 *
 * @since   4.0.0
 */
public function delete(string $task, string $text = 'JTOOLBAR_DELETE') : ConfirmButton
{
    return $this->confirmButton('delete', $text)->task($task);
}