Skip to content
Snippets Groups Projects
Commit c274ac3a authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fix tooltip icon usage, fixes #4957

Closes #4957

Merge request studip/studip!3723
parent c1e29f7e
No related branches found
No related tags found
No related merge requests found
......@@ -412,11 +412,13 @@ function tooltip2($text, $with_alt = TRUE, $with_popup = FALSE) {
/**
* returns a html-snippet with an icon and a tooltip on it
*
* @param string $text tooltip text, html gets encoded
* @param string|null $text tooltip text, html gets encoded
* @param bool $important render icon in "important" style
* @param bool $html tooltip text is HTML content
* @param bool $alt_info
* @return string
*/
function tooltipIcon(string $text, bool $important = false, bool $html = false, bool $alt_info= false): string
function tooltipIcon(?string $text, bool $important = false, bool $html = false, bool $alt_info= false): string
{
if (!trim($text)) {
return '';
......@@ -430,10 +432,11 @@ function tooltipIcon(string $text, bool $important = false, bool $html = false,
/**
* returns a html-snippet with an icon and a tooltip on it
*
* @param string $text tooltip text, html is rendered as is
* @param string|null $text tooltip text, html is rendered as is
* @param bool $important render icon in "important" style
* @return string
*/
function tooltipHtmlIcon(string $text, bool $important = false)
function tooltipHtmlIcon(?string $text, bool $important = false)
{
return tooltipIcon($text, $important, true);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment