public static void
modal
(mixed $targetModalId, mixed $icon, mixed $alt, mixed $class = 'btn-primary')
/**
* Displays a modal button
*
* @param string $targetModalId ID of the target modal box
* @param string $icon Icon class to show on modal button
* @param string $alt Title for the modal button
* @param string $class The button class
*
* @return void
*
* @since 3.2
*/
public static function modal($targetModalId, $icon, $alt, $class = 'btn-primary')
{
$title = Text::_($alt);
$dhtml = '<joomla-toolbar-button><button data-bs-toggle="modal" data-bs-target="#' . $targetModalId . '" class="btn ' . $class . '">
<span class="' . $icon . ' icon-fw" title="' . $title . '"></span> ' . $title . '</button></joomla-toolbar-button>';
$bar = Toolbar::getInstance('toolbar');
$bar->appendButton('Custom', $dhtml, $alt);
}