Back to CoreButtonsTrait class

Method makeDefault

public \Joomla\CMS\Toolbar\Button\StandardButton
makeDefault
(string $task, string $text = 'JTOOLBAR_DEFAULT')
Writes a common 'default' button for a record.
Parameters
  • string $task An override for the task.
  • string $text An override for the alt text.
Returns
  • \Joomla\CMS\Toolbar\Button\StandardButton
Since
  • 4.0.0

Method makeDefault - Source code

/**
 * Writes a common 'default' button for a record.
 *
 * @param   string  $task  An override for the task.
 * @param   string  $text  An override for the alt text.
 *
 * @return  StandardButton
 *
 * @since   4.0.0
 */
public function makeDefault(string $task, string $text = 'JTOOLBAR_DEFAULT') : StandardButton
{
    return $this->standardButton('default', $text)->task($task);
}