Back to ToolbarHelper class

Method trash

public static void
trash
(mixed $task = 'remove', mixed $alt = 'JTOOLBAR_TRASH', mixed $check = true)
Writes a common 'trash' button for a list of records.
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
  • bool $check True to allow lists.
Returns
  • void
Since
  • 1.5
Class: ToolbarHelper
Project: Joomla

Method trash - Source code

/**
 * Writes a common 'trash' button for a list of records.
 *
 * @param   string  $task   An override for the task.
 * @param   string  $alt    An override for the alt text.
 * @param   bool    $check  True to allow lists.
 *
 * @return  void
 *
 * @since   1.5
 */
public static function trash($task = 'remove', $alt = 'JTOOLBAR_TRASH', $check = true)
{
    $bar = Toolbar::getInstance('toolbar');
    // Add a trash button.
    $bar->appendButton('Standard', 'trash', $alt, $task, $check, false);
}