VirtueMart  3.2.14.9808
Static Public Member Functions | Static Protected Attributes | List of all members
VmHtml Class Reference

Static Public Member Functions

static ensureUniqueId ($id)
 
static shopMakeHtmlSafe ($string, $quote_style='ENT_QUOTES', $use_entities=false)
 
static vmGetCharset ()
 
static row ($func, $label)
 
static value ($value)
 
static raw ($value)
 
static checkbox ($name, $value, $checkedValue=1, $uncheckedValue=0, $extraAttribs= '', $id=null)
 
static select ($name, $options, $default= '0', $attrib="onchange='submit();'", $key='value', $text='text', $zero=true, $chosenDropDowns=true, $tranlsate=true)
 
static genericlist ($data, $name, $attribs=null, $optKey= 'value', $optText= 'text', $selected=null, $idtag=false, $translate=false)
 
static options ($arr, $optKey= 'value', $optText= 'text', $selected=null, $translate=false)
 
static selectList ($name, $value, $arrIn, $size=1, $multiple="", $extra="", $data_placeholder='')
 
static color ($name, $value)
 
static radioList ($name, $value, &$arr, $extra="", $separator='< br/>')
 
static radio ($name, $radios, $default, $key='value', $text='text')
 
static booleanlist ($name, $value, $class='class="inputbox"')
 
static input ($name, $value, $class='class="inputbox"', $readonly='', $size='37', $maxlength='255', $more='')
 
static textarea ($name, $value, $class='class="inputbox"', $cols='100', $rows="4")
 
static editor ($name, $value, $size='100%', $height='300', $hide=array('pagebreak', 'readmore'))
 
static inputHidden ($values)
 
static validate ($type='', $required=true, $min=null, $max=null, $match=null)
 

Static Protected Attributes

static $_optionDefaults
 
static $_usedId = array()
 

Member Function Documentation

static VmHtml::booleanlist (   $name,
  $value,
  $class = 'class="inputbox"' 
)
static

Creating rows with boolean list

Author
Patrick Kohl
Parameters
string$label
string$name
string$value
static VmHtml::checkbox (   $name,
  $value,
  $checkedValue = 1,
  $uncheckedValue = 0,
  $extraAttribs = '',
  $id = null 
)
static

Generate HTML code for a checkbox

Parameters
stringName for the checkbox
mixedCurrent value of the checkbox
mixedValue to assign when checkbox is checked
mixedValue to assign when checkbox is not checked
Returns
string HTML code for checkbox
static VmHtml::color (   $name,
  $value 
)
static
Author
Joomla
static VmHtml::editor (   $name,
  $value,
  $size = '100%',
  $height = '300',
  $hide = array('pagebreak', 'readmore') 
)
static

render editor code

Author
Patrick Kohl
Parameters
string$text
string$name
string$value
static VmHtml::ensureUniqueId (   $id)
static
static VmHtml::genericlist (   $data,
  $name,
  $attribs = null,
  $optKey = 'value',
  $optText = 'text',
  $selected = null,
  $idtag = false,
  $translate = false 
)
static

Generates an HTML selection list.

Author
Joomla 2.5.14
Parameters
array$dataAn array of objects, arrays, or scalars.
string$nameThe value of the HTML name attribute.
mixed$attribsAdditional HTML attributes for the <select> tag. This can be an array of attributes, or an array of options. Treated as options if it is the last argument passed. Valid options are: Format options, see {
See also
JHtml::$formatOptions}. Selection options, see {
JHtmlSelect::options()}. list.attr, string|array: Additional attributes for the select element. id, string: Value to use as the select element id attribute. Defaults to the same as the name. list.select, string|array: Identifies one or more option elements to be selected, based on the option key values.
Parameters
string$optKeyThe name of the object variable for the option value. If set to null, the index of the value array is used.
string$optTextThe name of the object variable for the option text.
mixed$selectedThe key that is selected (accepts an array or a string).
mixed$idtagValue of the field id or null by default
boolean$translateTrue to translate
Returns
string HTML for the select list.
Since
11.1
static VmHtml::input (   $name,
  $value,
  $class = 'class="inputbox"',
  $readonly = '',
  $size = '37',
  $maxlength = '255',
  $more = '' 
)
static

Creating rows with input fields

Parameters
string$text
string$name
string$value
static VmHtml::inputHidden (   $values)
static

renders the hidden input

Author
Max Milbers
static VmHtml::options (   $arr,
  $optKey = 'value',
  $optText = 'text',
  $selected = null,
  $translate = false 
)
static

Generates the option tags for an HTML select list (with no select tag surrounding the options).

Author
Joomla 2.5.14
Parameters
array$arrAn array of objects, arrays, or values.
mixed$optKeyIf a string, this is the name of the object variable for the option value. If null, the index of the array of objects is used. If an array, this is a set of options, as key/value pairs. Valid options are: -Format options, {
See also
JHtml::$formatOptions}. -groups: Boolean. If set, looks for keys with the value "&lt;optgroup>" and synthesizes groups from them. Deprecated. Defaults true for backwards compatibility. -list.select: either the value of one selected option or an array of selected options. Default: none. -list.translate: Boolean. If set, text and labels are translated via vmText::_(). Default is false. -option.id: The property in each option array to use as the selection id attribute. Defaults to none. -option.key: The property in each option array to use as the selection value. Defaults to "value". If set to null, the index of the option array is used. -option.label: The property in each option array to use as the selection label attribute. Defaults to null (none). -option.text: The property in each option array to use as the displayed text. Defaults to "text". If set to null, the option array is assumed to be a list of displayable scalars. -option.attr: The property in each option array to use for additional selection attributes. Defaults to none. -option.disable: The property that will hold the disabled state. Defaults to "disable". -option.key: The property that will hold the selection value. Defaults to "value". -option.text: The property that will hold the the displayed text. Defaults to "text". If set to null, the option array is assumed to be a list of displayable scalars.
Parameters
string$optTextThe name of the object variable for the option text.
mixed$selectedThe key that is selected (accepts an array or a string)
boolean$translateTranslate the option values.
Returns
string HTML for the select list
Since
11.1
static VmHtml::radio (   $name,
  $radios,
  $default,
  $key = 'value',
  $text = 'text' 
)
static

Creates radio List

Parameters
array$radios
string$name
string$default
Returns
string
static VmHtml::radioList (   $name,
  $value,
$arr,
  $extra = "",
  $separator = '<br />' 
)
static

Creates a Radio Input List

Parameters
string$name
string$valuedefault value
string$arr
string$extra
Returns
string
static VmHtml::raw (   $value)
static

The sense is unclear !

Deprecated:
Parameters
$value
Returns
mixed
static VmHtml::row (   $func,
  $label 
)
static

Generate HTML code for a row using VmHTML function works also with shopfunctions, for example $html .= VmHTML::row (array('ShopFunctions', 'renderShopperGroupList'), 'VMCUSTOM_BUYER_GROUP_SHOPPER', $field->shopper_groups, TRUE, 'custom_param['.$row.'][shopper_groups][]', ' ');

string : function to call string : Text Label array : arguments

Returns
string: HTML code for row table
static VmHtml::select (   $name,
  $options,
  $default = '0',
  $attrib = "onchange='submit();'",
  $key = 'value',
  $text = 'text',
  $zero = true,
  $chosenDropDowns = true,
  $tranlsate = true 
)
static
Author
Patrick Kohl
Parameters
array$options,(value & text)
string$nameoption name
string$defautdefaut value
string$keyoption value
string$textoption text
boolean$zeroadd a '0' value in the option return a select list
static VmHtml::selectList (   $name,
  $value,
  $arrIn,
  $size = 1,
  $multiple = "",
  $extra = "",
  $data_placeholder = '' 
)
static

Prints an HTML dropdown box named $name using $arr to load the drop down. If $value is in $arr, then $value will be the selected option in the dropdown.

Author
gday
soeren
Parameters
string$nameThe name of the select element
string$valueThe pre-selected value
array$arrThe array containing $key and $val
int$sizeThe size of the select element
string$multipleuse "multiple=\"multiple" to have a multiple choice select list
string$extraMore attributes when needed
Returns
string HTML drop-down list
static VmHtml::shopMakeHtmlSafe (   $string,
  $quote_style = 'ENT_QUOTES',
  $use_entities = false 
)
static

Converts all special chars to html entities

Parameters
string$string
string$quote_style
boolean$only_special_charsOnly Convert Some Special Chars ? ( <, >, &, ... )
Returns
string
static VmHtml::textarea (   $name,
  $value,
  $class = 'class="inputbox"',
  $cols = '100',
  $rows = "4" 
)
static

Creating rows with input fields

Author
Patrick Kohl
Parameters
string$text
string$name
string$value
$type type of regular Expression to VmHtml::validate (   $type = '',
  $required = true,
  $min = null,
  $max = null,
  $match = null 
)
static
Author
Patrick Kohl

$type can be I integer, F Float, A date, M, time, T text, L link, U url, P phone $required field is required $min minimum of char $max max of char

static VmHtml::value (   $value)
static
static VmHtml::vmGetCharset ( )
static

Returns the charset string from the global _ISO constant

Deprecated:
Returns
string UTF-8 by default
Since
1.0.5

Member Data Documentation

VmHtml::$_optionDefaults
staticprotected
Initial value:
= array(
'option' => array('option.attr' => null, 'option.disable' => 'disable', 'option.id' => null, 'option.key' => 'value',
'option.key.toHtml' => true, 'option.label' => null, 'option.label.toHtml' => true, 'option.text' => 'text',
'option.text.toHtml' => true))
VmHtml::$_usedId = array()
staticprotected

The documentation for this class was generated from the following file: