Back to CoreButtonsTrait class

Method unpublish

public \Joomla\CMS\Toolbar\Button\StandardButton
unpublish
(string $task, string $text = 'JTOOLBAR_UNPUBLISH')
Writes a common 'unpublish' button.
Parameters
  • string $task The task name of this button.
  • string $text The text of this button.
Returns
  • \Joomla\CMS\Toolbar\Button\StandardButton
Since
  • 4.0.0

Method unpublish - Source code

/**
 * Writes a common 'unpublish' button.
 *
 * @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 unpublish(string $task, string $text = 'JTOOLBAR_UNPUBLISH') : StandardButton
{
    return $this->standardButton('unpublish', $text)->task($task);
}