public \Joomla\CMS\Toolbar\Button\LinkButton
preferences
(string $component, string $text = 'JTOOLBAR_OPTIONS', string $path = '')
/**
* Writes a configuration button and invokes a cancel operation (eg a checkin).
*
* @param string $component The name of the component, eg, com_content.
* @param string $text The text of this button.
* @param string $path An alternative path for the configuration xml relative to JPATH_SITE.
*
* @return LinkButton
*
* @since 4.0.0
*/
public function preferences(string $component, string $text = 'JTOOLBAR_OPTIONS', string $path = '') : LinkButton
{
$component = urlencode($component);
$path = urlencode($path);
$uri = (string) Uri::getInstance();
$return = urlencode(base64_encode($uri));
return $this->linkButton('options', $text)->url('index.php?option=com_config&view=component&component=' . $component . '&path=' . $path . '&return=' . $return);
}