< JToolBarHelper


Writes a custom option and task button for the button bar.

  • @param string $task The task to perform (picked up by the switch($task) blocks.
  • @param string $icon The image to display.
  • @param string $iconOver The image to display when moused over.
  • @param string $alt The alt text for the icon image.
  • @param bool $listSelect True if required to check that a standard list item is checked.
public static function custom($task = '', $icon = '', $iconOver = '', $alt = '', $listSelect = true)
	$bar = JToolbar::getInstance('toolbar');
	// Strip extension.
	$icon = preg_replace('#\.[^.]*$#', '', $icon);
	// Add a standard button.
	$bar->appendButton('Standard', $icon, $alt, $task, $listSelect);

[Joomla 3.2]