Skip to content

icms_ipf_form_elements_Checkbox

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!

icms_ipf_form_elements_Checkbox

Form control creating a checkbox element for an object derived from icms_ipf_Object

Properties

$_delimeter

private string $_delimeter

HTML to separate the elements

  • Visibility: private

$_options

private array $_options = array()

Available options

  • Visibility: private

$_value

private array $_value = array()

pre-selected values in array

  • Visibility: private

Methods

__construct

mixed icms_form_elements_Checkbox::__construct(string caption, string name, mixed value, mixed delimeter)

Constructor

Arguments

  • caption string
  • name string
  • value mixed - <p>Either one value as a string or an array of them.</p>
  • delimeter mixed

render

string icms_form_elements_Checkbox::render()

prepare HTML for output

renderValidationJS

string icms_ipf_form_elements_Checkbox::renderValidationJS()

Creates validation javascript

  • Visibility: public

getValue

array icms_form_elements_Checkbox::getValue(bool encode)

Get the "value"

Arguments

  • encode bool - <p>Would you like to sanitize the text?</p>

setValue

mixed icms_form_elements_Checkbox::setValue(mixed value)

Set the "value"

Arguments

  • value mixed

addOption

mixed icms_form_elements_Checkbox::addOption(string value, string name)

Add an option

Arguments

  • value string
  • name string

addOptionArray

mixed icms_form_elements_Checkbox::addOptionArray(array options)

Add multiple Options at once

Arguments

  • options array - <p>Associative array of value->name pairs</p>

getOptions

array icms_form_elements_Checkbox::getOptions(int encode)

Get an array with all the options

Arguments

  • encode int - <p>To sanitize the text? potential values: 0 - skip; 1 - only for value; 2 - for both value and name</p>

getDelimeter

string icms_form_elements_Checkbox::getDelimeter(bool encode)

Get the delimiter of this group

Arguments

  • encode bool - <p>To sanitizer the text?</p>
Clone this wiki locally