Skip to content

icms_form_elements_select_Image

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_Image

Create a form element to select an image

Properties

$_optgroups

private array $_optgroups = array()

OptGroup

  • Visibility: private

$_optgroupsID

private mixed $_optgroupsID = array()
  • Visibility: private

$_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>

addOptGroup

mixed icms_form_elements_select_Image::addOptGroup(string value, string name)

Adiciona um Optgroup

  • Visibility: public

Arguments

  • value string - <p>opções do Grupo</p>
  • name string - <p>Nome do Grupo de opções</p>

addOptGroupArray

mixed icms_form_elements_select_Image::addOptGroupArray(array options)

Adiciona m�ltiplos Optgroups

  • Visibility: public

Arguments

  • options array - <p>Array com nome->opções</p>

getImageList

string icms_form_elements_select_Image::getImageList(mixed cat)

Gets the image list

  • Visibility: public

Arguments

  • cat mixed - <p>category number or array of categories</p>

getOptGroups

array icms_form_elements_select_Image::getOptGroups()

Get Optgroups

  • Visibility: public

getOptGroupsID

array icms_form_elements_select_Image::getOptGroupsID()

Get OptgroupIDs

  • Visibility: public

render

string icms_form_elements_Select::render()

Prepare HTML for output

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>
Clone this wiki locally