Back to CoreButtonsTrait class

Method trash

public \Joomla\CMS\Toolbar\Button\StandardButton
trash
(string $task, string $text = 'JTOOLBAR_TRASH')
Writes a common 'trash' button.
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 trash - Source code

/**
 * Writes a common 'trash' button.
 *
 * @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 trash(string $task, string $text = 'JTOOLBAR_TRASH') : StandardButton
{
    return $this->standardButton('trash', $text)->task($task);
}