Back to CoreButtonsTrait class

Method assign

public \Joomla\CMS\Toolbar\Button\StandardButton
assign
(string $task, string $text = 'JTOOLBAR_ASSIGN')
Writes a common 'assign' button for a record.
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 assign - Source code

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