src/PeskyCMF/Scaffold/MenuItem/CmfRedirectMenuItem.php
public function renderAsIcon(string $additionalClasses = '', bool $allowIconColorClass = true): string {
        if ($this->isAccessible()) {
            return $this->wrapIntoShowCondition(
                Tag::a($this->makeIcon($allowIconColorClass))
                    ->setClass($additionalClasses)
                    ->setHref($this->getUrl())
                    ->setTitle($this->getTooltipOrTitle())
                    ->setTarget($this->openOnNewTab ? '_blank' : null)
                    ->setDataAttr('toggle', $this->hasTooltipOrTitle() ? 'tooltip' : null)
                    ->setDataAttr('position', $this->hasTooltipOrTitle() ? $this->getTooltipPosition() : null)
                    ->build()
            );
        } else {
            return '';
        }
    }
public function renderAsIcon(string $additionalClasses = '', bool $allowIconColorClass = true): string {
        if ($this->isAccessible()) {
            return $this->wrapIntoShowCondition(
                Tag::a($this->makeIcon($allowIconColorClass))
                    ->setClass($additionalClasses)
                    ->setHref($this->getUrl())
                    ->setTitle($this->getTooltipOrTitle())
                    ->setTarget($this->openOnNewTab ? '_blank' : null)
                    ->setDataAttr('toggle', $this->hasTooltipOrTitle() ? 'tooltip' : null)
                    ->setDataAttr('position', $this->hasTooltipOrTitle() ? $this->getTooltipPosition() : null)
                    ->build()
            );
        } else {
            return '';
        }
    }
Render menu item as <a> icon (title will be used as tooltip)
@param string $additionalClasses - classes to add to <a> tag
@param bool $allowIconColorClass
@return string