src/HtmlGenerator.php
/**
     * Effectively generates a normal link, but rendered as a button. e.g <a href=''>; The main 
     * advantage is that you can specify a confirm message or create a better/different look.
     * Note that this will be a form submit button and not a javascript button.
     * 
     * @param label       - the label to appear on the button.
     * @param location    - where you want the link to go
     * @param confirm     - set to true if you want a confirm dialogue to confirm.
     * @param confMessage - if confirm set to true, this will be the message that is displayed.
     * 
     * @return string - the generated html for the button.
     */
Effectively generates a normal link, but rendered as a button. e.g ; The main
advantage is that you can specify a confirm message or create a better/different look.
Note that this will be a form submit button and not a javascript button.

@param label       - the label to appear on the button.
@param location    - where you want the link to go
@param confirm     - set to true if you want a confirm dialogue to confirm.
@param confMessage - if confirm set to true, this will be the message that is displayed.

@return string - the generated html for the button.
Effectively generates a normal link but rendered as a button . e . g ; The main advantage is that you can specify a confirm message or create a better / different look . Note that this will be a form submit button and not a javascript button . @param label - the label to appear on the button . @param location - where you want the link to go @param confirm - set to true if you want a confirm dialogue to confirm . @param confMessage - if confirm set to true this will be the message that is displayed . @return string - the generated html for the button .
public static function createButtonLink($label, 
                                            $location, 
                                            $confirm=false, 
                                            $confMessage="")
    {
        $confirmAttribute = "";
        if ($confirm)
        {
            $onclick = "return confirm('" . $confMessage . "')";
            $confirmAttribute = 'onsubmit="' . $onclick . '"';
        }
        $html = 
            '<form method="post" action="' . $location . '" ' . $confirmAttribute . '>' .
                self::generateSubmitButton($label) .
            '</form>';
        return $html;
    }
public static function createButtonLink ( $ label , $ location , $ confirm = false , $ confMessage = " " ) { $ confirmAttribute = " " ; if ( $ confirm ) { $ onclick = " return confirm(' " . $ confMessage . " ') " ; $ confirmAttribute = 'onsubmit="' . $ onclick . '"' ; } $ html = '<form method="post" action="' . $ location . '" ' . $ confirmAttribute . '>' . self :: generateSubmitButton ( $ label ) . '</form>' ; return $ html ; }
Effectively generates a normal link, but rendered as a button.
Effectively generates a normal link but rendered as a button .