Back to ToolbarHelper class

Method save2copy

public static void
save2copy
(mixed $task = 'save2copy', mixed $alt = 'JTOOLBAR_SAVE_AS_COPY')
Writes a save as copy button for a given option.
Parameters
  • string $task An override for the task.
  • string $alt An override for the alt text.
Returns
  • void
Since
  • 1.6
Class: ToolbarHelper
Project: Joomla

Method save2copy - Source code

/**
 * Writes a save as copy button for a given option.
 * Save as copy operation leads to a save after clearing the key,
 * then returns user to edit mode with new key.
 *
 * @param   string   $task  An override for the task.
 * @param   string   $alt   An override for the alt text.
 *
 * @return  void
 *
 * @since   1.6
 */
public static function save2copy($task = 'save2copy', $alt = 'JTOOLBAR_SAVE_AS_COPY')
{
    $bar = Toolbar::getInstance('toolbar');
    // Add a save and create new button.
    $bar->save2copy($task, $alt);
}