⇦ Back to CoreButtonsTrait classMethod save2new
public \Joomla\CMS\Toolbar\Button\StandardButton
save2new
(string $task, string $text = 'JTOOLBAR_SAVE_AND_NEW')
Writes a save and create new button for a given option.
Parameters
- string $task The task name of this button.
- string $text The text of this button.
Returns
- \Joomla\CMS\Toolbar\Button\StandardButton
Since
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 The task name of this button.
* @param string $text The text of this button.
*
* @return StandardButton
*
* @since 4.0.0
*/
public function save2new(string $task, string $text = 'JTOOLBAR_SAVE_AND_NEW') : StandardButton
{
return $this->standardButton('save-new', $text)->task($task)->formValidation(true);
}