-
Notifications
You must be signed in to change notification settings - Fork 35
icms_form_elements_Radioyn
Raimondas Rimkevičius edited this page Mar 9, 2020
·
1 revision
Notice: Wiki was automatic generated from project sources as project API documentation. Do not edit manually!
Yes/No radio buttons.
A pair of radio buttons labeled _YES and _NO with values 1 and 0
- Class name: icms_form_elements_Radioyn
- Namespace:
- Parent class: icms_form_elements_Radio
private array $_options = array()
Array of Options
- Visibility: private
private string $_value = \null
Pre-selected value
- Visibility: private
private string $_delimeter
HTML to separate the elements
- Visibility: private
mixed icms_form_elements_Radio::__construct(string caption, string name, string value, mixed delimeter)
Constructor
- Visibility: public
- This method is defined by icms_form_elements_Radio
- caption string - <p>Caption</p>
- name string - <p>"name" attribute</p>
- value string - <p>Pre-selected value</p>
- delimeter mixed
string icms_form_elements_Radio::getValue(bool encode)
Get the "value" attribute
- Visibility: public
- This method is defined by icms_form_elements_Radio
- encode bool - <p>To sanitizer the text?</p>
mixed icms_form_elements_Radio::setValue(value)
Set the pre-selected value
- Visibility: public
- This method is defined by icms_form_elements_Radio
- value mixed - <p>string</p>
mixed icms_form_elements_Radio::addOption(string value, string name)
Add an option
- Visibility: public
- This method is defined by icms_form_elements_Radio
- value string - <p>"value" attribute - This gets submitted as form-data.</p>
- name string - <p>"name" attribute - This is displayed. If empty, we use the "value" instead.</p>
mixed icms_form_elements_Radio::addOptionArray(array options)
Adds multiple options
- Visibility: public
- This method is defined by icms_form_elements_Radio
- options array - <p>Associative array of value->name pairs.</p>
array icms_form_elements_Radio::getOptions(int encode)
Get an array with all the options
- Visibility: public
- This method is defined by icms_form_elements_Radio
- encode int - <p>To sanitizer the text? potential values: 0 - skip; 1 - only for value; 2 - for both value and name</p>
string icms_form_elements_Radio::getDelimeter(bool encode)
Get the delimiter of this group
- Visibility: public
- This method is defined by icms_form_elements_Radio
- encode bool - <p>To sanitizer the text?</p>
string icms_form_elements_Radio::render()
Prepare HTML for output
- Visibility: public
- This method is defined by icms_form_elements_Radio