Skip to content

icms_form_elements_select_Timezone

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_form_elements_select_Timezone

A select box with timezones

Properties

$_options

private array $_options = array()

Options

  • Visibility: private

$_multiple

private bool $_multiple = \false

Allow multiple selections?

  • Visibility: private

$_size

private int $_size

Number of rows. "1" makes a dropdown list.

  • Visibility: private

$_value

private array $_value = array()

Pre-selcted values

  • Visibility: private

Methods

__construct

mixed icms_form_elements_Select::__construct(string caption, string name, mixed value, int size, bool multiple)

Constructor

Arguments

  • caption string - <p>Caption</p>
  • name string - <p>"name" attribute</p>
  • value mixed - <p>Pre-selected value (or array of them).</p>
  • size int - <p>Number or rows. "1" makes a drop-down-list</p>
  • multiple bool - <p>Allow multiple selections?</p>

getTimeZoneList

mixed icms_form_elements_select_Timezone::getTimeZoneList()

Create an array of timezones, translated by the local language files

  • Visibility: public
  • This method is static.

isMultiple

bool icms_form_elements_Select::isMultiple()

Are multiple selections allowed?

getSize

int icms_form_elements_Select::getSize()

Get the size

getValue

array icms_form_elements_Select::getValue(bool encode)

Get an array of pre-selected values

Arguments

  • encode bool - <p>To sanitizer the text?</p>

setValue

mixed icms_form_elements_Select::setValue(value)

Set pre-selected values

Arguments

  • value mixed - <p>mixed</p>

addOption

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

Add an option

Arguments

  • value string - <p>"value" attribute</p>
  • name string - <p>"name" attribute</p>

addOptionArray

mixed icms_form_elements_Select::addOptionArray(array options)

Add multiple options

Arguments

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

getOptions

array icms_form_elements_Select::getOptions(int encode)

Get an array with all the options

Note: both name and value should be sanitized. However for backward compatibility, only value is sanitized for now.

Arguments

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

render

string icms_form_elements_Select::render()

Prepare HTML for output

Clone this wiki locally