src/PeskyCMF/Scaffold/MenuItem/CmfRedirectMenuItem.php
public function renderAsBootstrapDropdownMenuItem(): string {
        if ($this->isAccessible()) {
            $link = Tag::a($this->makeIcon(true) . ' ' . $this->getTitle())
                ->setHref($this->getUrl())
                ->setTitle($this->getTooltip())
                ->setTarget($this->openOnNewTab ? '_blank' : null)
                ->setDataAttr('toggle', $this->hasTooltip() ? 'tooltip' : null)
                ->setDataAttr('position', $this->hasTooltip() ? $this->getTooltipPosition() : null)
                ->build();
            return $this->wrapIntoShowCondition(
                '<li ' . $this->makeConditionalDisabledAttribute() . '>' . $link . '</li>'
            );
        } else {
            return '';
        }
    }
public function renderAsBootstrapDropdownMenuItem(): string {
        if ($this->isAccessible()) {
            $link = Tag::a($this->makeIcon(true) . ' ' . $this->getTitle())
                ->setHref($this->getUrl())
                ->setTitle($this->getTooltip())
                ->setTarget($this->openOnNewTab ? '_blank' : null)
                ->setDataAttr('toggle', $this->hasTooltip() ? 'tooltip' : null)
                ->setDataAttr('position', $this->hasTooltip() ? $this->getTooltipPosition() : null)
                ->build();
            return $this->wrapIntoShowCondition(
                '<li ' . $this->makeConditionalDisabledAttribute() . '>' . $link . '</li>'
            );
        } else {
            return '';
        }
    }
public function renderAsBootstrapDropdownMenuItem ( ) : string { if ( $ this -> isAccessible ( ) ) { $ link = Tag :: a ( $ this -> makeIcon ( true ) . ' ' . $ this -> getTitle ( ) ) -> setHref ( $ this -> getUrl ( ) ) -> setTitle ( $ this -> getTooltip ( ) ) -> setTarget ( $ this -> openOnNewTab ? '_blank' : null ) -> setDataAttr ( 'toggle' , $ this -> hasTooltip ( ) ? 'tooltip' : null ) -> setDataAttr ( 'position' , $ this -> hasTooltip ( ) ? $ this -> getTooltipPosition ( ) : null ) -> build ( ) ; return $ this -> wrapIntoShowCondition ( '<li ' . $ this -> makeConditionalDisabledAttribute ( ) . '>' . $ link . '</li>' ) ; } else { return '' ; } }
Render menu item as <li><a>...</a></li> or <li><button>...</button></li>
@return string
Render menu item as <li > <a > ... < / a > < / li > or <li > <button > ... < / button > < / li >