src/UI/HTML/FormElements.php
public static function Checkbox( $name, $value, $checked = NULL, $class = NULL, $readOnly = NULL )
	{
		$attributes	= array(
			'id'		=> $name,
			'type'		=> "checkbox",
			'name'		=> $name,
			'value'		=> $value,
			'class'		=> $class,
			'checked'	=> $checked		? "checked"		: NULL,
			'disabled'	=> $readOnly && !is_string( $readOnly ) ? "disabled" : NULL,
		);
		if( $readOnly )
			self::addReadonlyAttributes( $attributes, $readOnly );
		return UI_HTML_Tag::create( "input", NULL, $attributes );
	}
public static function Checkbox( $name, $value, $checked = NULL, $class = NULL, $readOnly = NULL )
	{
		$attributes	= array(
			'id'		=> $name,
			'type'		=> "checkbox",
			'name'		=> $name,
			'value'		=> $value,
			'class'		=> $class,
			'checked'	=> $checked		? "checked"		: NULL,
			'disabled'	=> $readOnly && !is_string( $readOnly ) ? "disabled" : NULL,
		);
		if( $readOnly )
			self::addReadonlyAttributes( $attributes, $readOnly );
		return UI_HTML_Tag::create( "input", NULL, $attributes );
	}
public static function Checkbox ( $ name , $ value , $ checked = NULL , $ class = NULL , $ readOnly = NULL ) { $ attributes = array ( 'id' => $ name , 'type' => "checkbox" , 'name' => $ name , 'value' => $ value , 'class' => $ class , 'checked' => $ checked ? "checked" : NULL , 'disabled' => $ readOnly && ! is_string ( $ readOnly ) ? "disabled" : NULL , ) ; if ( $ readOnly ) self :: addReadonlyAttributes ( $ attributes , $ readOnly ) ; return UI_HTML_Tag :: create ( "input" , NULL , $ attributes ) ; }
Builds HTML Code for a Checkbox.
@access		public
@static
@param		string		$name 			Field Name
@param		string		$value 			Field Value if checked
@param		bool		$checked		Field State
@param		string		$class 			CSS Class
@param		mixed		$readOnly		Field is not writable, JavaScript Alert if String is given
@return		string
Builds HTML Code for a Checkbox .