';
}
$htmlCode .= '
';
// TODO: Add a simple and nicer divider.
if(!is_null($iconId)) {
$htmlCode .= '';
}
$htmlCode .= $text;
if(!is_null($rightText)) {
$htmlCode .= '' . $rightText . '';
}
$htmlCode .= '
';
if(!is_null($anchorId)) {
$htmlCode .= '';
}
return $htmlCode;
}
function printMainHeader(string $text, ?string $iconId = null, ?string $rightText = null, ?string $anchorId = null,
?string $backgroundClass = "bkgd-grid"): void {
global $_npDomUtilsHeadingCount;
$_npDomUtilsHeadingCount++;
echo(getMainHeader(
$text,
$iconId,
$rightText,
$anchorId,
($_npDomUtilsHeadingCount > 1),
$backgroundClass
));
}
function printSubHeader(string $text, ?string $anchorId = null, ?string $backgroundClass = "bkgd-math"): void {
if(is_null($backgroundClass)) {
$backgroundClass = "bkgd-math";
}
$headingText = getMainHeader(
$text,
null,
null,
$anchorId,
69, // Forcing it as a non-first of main heading.
$backgroundClass,
3
);
$headingText = str_replace("t-size-14", "t-size-11", $headingText);
echo($headingText);
}
?>