src/UI/HTML/FormElements.php
public static function LinkButton( $url, $label, $class = NULL, $confirm = NULL, $disabled = NULL, $title = NULL )
	{
		$action			= "document.location.href='".$url."';";
		$attributes	= array(
			'id'		=> "button_".md5( $label ),
			'type'		=> "button",
			'class'		=> $class,
			'onclick'	=> $confirm	? "if(confirm('".$confirm."')){".$action."};" : $action,
			'title'		=> $title,
		);
		if( $disabled )
			self::addDisabledAttributes( $attributes, $disabled );
		return UI_HTML_Tag::create( "button", UI_HTML_Tag::create( "span", $label ), $attributes );
	}
public static function LinkButton( $url, $label, $class = NULL, $confirm = NULL, $disabled = NULL, $title = NULL )
	{
		$action			= "document.location.href='".$url."';";
		$attributes	= array(
			'id'		=> "button_".md5( $label ),
			'type'		=> "button",
			'class'		=> $class,
			'onclick'	=> $confirm	? "if(confirm('".$confirm."')){".$action."};" : $action,
			'title'		=> $title,
		);
		if( $disabled )
			self::addDisabledAttributes( $attributes, $disabled );
		return UI_HTML_Tag::create( "button", UI_HTML_Tag::create( "span", $label ), $attributes );
	}
public static function LinkButton ( $ url , $ label , $ class = NULL , $ confirm = NULL , $ disabled = NULL , $ title = NULL ) { $ action = "document.location.href='" . $ url . "';" ; $ attributes = array ( 'id' => "button_" . md5 ( $ label ) , 'type' => "button" , 'class' => $ class , 'onclick' => $ confirm ? "if(confirm('" . $ confirm . "')){" . $ action . "};" : $ action , 'title' => $ title , ) ; if ( $ disabled ) self :: addDisabledAttributes ( $ attributes , $ disabled ) ; return UI_HTML_Tag :: create ( "button" , UI_HTML_Tag :: create ( "span" , $ label ) , $ attributes ) ; }
Builds HTML Code for a Button behaving like a Link.
@access		public
@static
@param		string		$label			Button Label, also used for ID with Prefix 'button_' and MD5 Hash
@param		string		$url			URL to request
@param		string		$class			CSS Class
@param		string		$confirm 		Confirmation Message
@param		mixed		$disabled		Button is not pressable, JavaScript Alert if String is given
@param		string		$title			Title text on mouse hove
@return		string
Builds HTML Code for a Button behaving like a Link .