Back to ToolbarHelper class

Method publish

public static void
publish
(mixed $task = 'publish', mixed $alt = 'JTOOLBAR_PUBLISH', mixed $check = false)
Writes a common 'publish' button.
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
  • bool $check True if required to check that a standard list item is checked.
Returns
  • void
Since
  • 1.5
Class: ToolbarHelper
Project: Joomla

Method publish - Source code

/**
 * Writes a common 'publish' button.
 *
 * @param   string   $task   An override for the task.
 * @param   string   $alt    An override for the alt text.
 * @param   boolean  $check  True if required to check that a standard list item is checked.
 *
 * @return  void
 *
 * @since   1.5
 */
public static function publish($task = 'publish', $alt = 'JTOOLBAR_PUBLISH', $check = false)
{
    $bar = Toolbar::getInstance('toolbar');
    // Add a publish button.
    $bar->appendButton('Standard', 'publish', $alt, $task, $check);
}