Back to ToolbarHelper class

Method save2new

public static void
save2new
(mixed $task = 'save2new', mixed $alt = 'JTOOLBAR_SAVE_AND_NEW')
Writes a save and create new 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 save2new - Source code

/**
 * Writes a save and create new button for a given option.
 * Save and create operation leads to a save and then add action.
 *
 * @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 save2new($task = 'save2new', $alt = 'JTOOLBAR_SAVE_AND_NEW')
{
    $bar = Toolbar::getInstance('toolbar');
    // Add a save and create new button.
    $bar->save2new($task, $alt);
}