public function bootstrapButtonLinkFilter($button, $href = self::DEFAULT_HREF, $target = null) {

        if (1 === preg_match("/disabled=\"disabled\"/", $button)) {

            $searches = [" disabled=\"disabled\"", "class=\""];
            $replaces = ["", "class=\"disabled "];

            $button = StringHelper::replace($button, $searches, $replaces);
        }

        $searches = ["<button", "type=\"button\"", "</button>"];
        $replaces = ["<a", "href=\"" . $href . "\"" . (null !== $target ? " target=\"" . $target . "\"" : ""), "</a>"];

        return StringHelper::replace($button, $searches, $replaces);
    }
public function bootstrapButtonLinkFilter($button, $href = self::DEFAULT_HREF, $target = null) {

        if (1 === preg_match("/disabled=\"disabled\"/", $button)) {

            $searches = [" disabled=\"disabled\"", "class=\""];
            $replaces = ["", "class=\"disabled "];

            $button = StringHelper::replace($button, $searches, $replaces);
        }

        $searches = ["<button", "type=\"button\"", "</button>"];
        $replaces = ["<a", "href=\"" . $href . "\"" . (null !== $target ? " target=\"" . $target . "\"" : ""), "</a>"];

        return StringHelper::replace($button, $searches, $replaces);
    }
public function bootstrapButtonLinkFilter ( $ button , $ href = self :: DEFAULT_HREF , $ target = null ) { if ( 1 === preg_match ( "/disabled=\"disabled\"/" , $ button ) ) { $ searches = [ " disabled=\"disabled\"" , "class=\"" ] ; $ replaces = [ "" , "class=\"disabled " ] ; $ button = StringHelper :: replace ( $ button , $ searches , $ replaces ) ; } $ searches = [ "<button" , "type=\"button\"" , "</button>" ] ; $ replaces = [ "<a" , "href=\"" . $ href . "\"" . ( null !== $ target ? " target=\"" . $ target . "\"" : "" ) , "</a>" ] ; return StringHelper :: replace ( $ button , $ searches , $ replaces ) ; }
Transforms a Bootstrap button into an anchor.

@param string $button The button.
@param string $href The href attribute.
@param string $target The target attribute.
@return string Returns the Bootstrap button transformed into an anchor.
Transforms a Bootstrap button into an anchor .