Form
in package
Table of Contents
Methods
- getAreaSubmitBox() : string
- Get's the submit button below textarea via page_diff_elements.tpl.php
- getCheckbox() : string
- Zeigt eine Checkbox Weitere Parameter in dieser Reihenfolge: Text, Check, Value, CSS
- getChecked() : string
- compares the first with the second and returns
- getHidden() : string
- erzeugt ein <input type=hidden name=$name value=$val>
- getInput() : string
- Generates an <input> or <select> element.
- getOptions() : string
- Create select options from an 1-dim or 2-dim array The 1-dim gets an auto index from php, the 2-dim an index from the code
- getRadio() : string
- Zeigt beliebig viele Radio-Buttons für values 0,1,2 etc
- getRadioSingle() : string
- For a single radio button
- getRadioWithLabel() : string
- Gets input type radio with css
- getSubmit() : string
- Zeigt einen Submit-Button Checkbox Weitere Parameter in dieser Reihenfolge: Value, Css, title
- getTextarea() : string
- for a textarea if id is not set, name is used
- addAttribute() : string
- getSelect() : string
- Generates a <select> element with pre-generated <option>s.
- isUsingValuesOnly() : bool
- renderOption() : string
Methods
getAreaSubmitBox()
Get's the submit button below textarea via page_diff_elements.tpl.php
public
static getAreaSubmitBox([array<string|int, mixed> $change = [] ]) : string
Parameters
- $change : array<string|int, mixed> = []
-
- array of paras
Return values
stringgetCheckbox()
Zeigt eine Checkbox Weitere Parameter in dieser Reihenfolge: Text, Check, Value, CSS
public
static getCheckbox(string $strName) : string
Parameters
- $strName : string
-
des Feldes
Return values
string —- the checkbox
getChecked()
compares the first with the second and returns
public
static getChecked(mixed $strSQLVar, mixed $strHtmlVar) : string
Parameters
- $strSQLVar : mixed
- $strHtmlVar : mixed
Return values
string —- ' checked="checked"' | ''
getHidden()
erzeugt ein <input type=hidden name=$name value=$val>
public
static getHidden(string $name, mixed $val[, string $fieldID = '' ]) : string
Parameters
- $name : string
- $val : mixed
- $fieldID : string = ''
Return values
stringgetInput()
Generates an <input> or <select> element.
public
static getInput([array<string|int, mixed> $atts = [] ]) : string
- Creates an or
- Defaults to if 'type' is not specified or is not 'select'.
- For
Parameters
- $atts : array<string|int, mixed> = []
-
The attributes for the form element.
Return values
string —The generated HTML for the input or select.
getOptions()
Create select options from an 1-dim or 2-dim array The 1-dim gets an auto index from php, the 2-dim an index from the code
public
static getOptions([array<string|int, mixed> $options = [] ][, mixed $selected = '' ][, bool $useKeysAsValues = false ]) : string
Parameters
- $options : array<string|int, mixed> = []
- $selected : mixed = ''
- $useKeysAsValues : bool = false
Return values
string —- the options
getRadio()
Zeigt beliebig viele Radio-Buttons für values 0,1,2 etc
public
static getRadio(string $strName) : string
Parameters
- $strName : string
-
des feldes
nutzt func_get_vars [1]=$nCheck = '0', [2]=$strFlagText = ''
Return values
string —- the radio buttons
getRadioSingle()
For a single radio button
public
static getRadioSingle(array<string|int, mixed> $att) : string
Parameters
- $att : array<string|int, mixed>
-
name, value, id, content, css, checked (true|false)
Return values
string —- the checkbox
getRadioWithLabel()
Gets input type radio with css
public
static getRadioWithLabel(array<string|int, mixed> $saLabel) : string
Needed only if we have other values than integers (0,1,2..) or if we need a class or if we need another order
Otherwise @param array $saLabel - $saLabel[0] = array("id"=>"","name"=>"","value"=>"","checked"=>"","content"=>"");
Parameters
- $saLabel : array<string|int, mixed>
Tags
Return values
stringgetSubmit()
Zeigt einen Submit-Button Checkbox Weitere Parameter in dieser Reihenfolge: Value, Css, title
public
static getSubmit([string $strName = '' ]) : string
Parameters
- $strName : string = ''
-
des Buttons
Return values
string —- the submit-button
getTextarea()
for a textarea if id is not set, name is used
public
static getTextarea([array<string|int, mixed> $atts = [] ]) : string
Parameters
- $atts : array<string|int, mixed> = []
-
id, name, value, css, placeholder, extra
Return values
string —- the textarea
addAttribute()
private
static addAttribute(array<string|int, mixed>|string $value, int|string $key, string $input) : string
Parameters
- $value : array<string|int, mixed>|string
- $key : int|string
- $input : string
Return values
stringgetSelect()
Generates a <select> element with pre-generated <option>s.
private
static getSelect(array<string|int, mixed> $atts) : string
Parameters
- $atts : array<string|int, mixed>
-
The attributes for the
Return values
string —The generated HTML for the select element.
isUsingValuesOnly()
private
static isUsingValuesOnly(array<string|int, mixed> $options) : bool
Parameters
- $options : array<string|int, mixed>
Return values
boolrenderOption()
private
static renderOption(bool $isSelected, int|string $value, int|string $description) : string
Parameters
- $isSelected : bool
- $value : int|string
- $description : int|string