XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
RMFormSelect Class Reference
Inheritance diagram for RMFormSelect:
Inheritance graph

Public Member Functions

 __construct ($caption, $name, $multi=0, $selected=null)
 
 addOption ($value, $caption, $select=0, $disabled=false, $style='')
 
 addOptionsArray ($options)
 
 getOptions ()
 
 getRows ()
 
 render ()
 
 setRows ($value)
 
 setSelected ($index)
 
- Public Member Functions inherited from RMFormElement
 addClass ($class)
 
 getCaption ()
 
 getClass ()
 
 getDescription ()
 
 getExtra ()
 
 getForm ()
 
 getName ()
 
 id ()
 
 render ()
 
 setCaption ($caption)
 
 setClass ($class)
 
 setDescription ($desc)
 
 setExtra ($extra)
 
 setForm ($name)
 
 setId ($id)
 
 setName ($name)
 

Private Attributes

 $_multi = 0
 
 $_options = array()
 
 $_rows = 5
 
 $_selected = null
 

Additional Inherited Members

- Static Public Attributes inherited from RMFormElement
static $elementsIds = array()
 

Detailed Description

Clase para la generación de campos SELECT

Definition at line 14 of file select.class.php.

Constructor & Destructor Documentation

RMFormSelect::__construct (   $caption,
  $name,
  $multi = 0,
  $selected = null 
)

Constructor de la clase

Parameters
string$captionTexto de la etiqueta
string$nameNombre del elemento
int$multiSeleccion múltiple (0 = Inactivo, 1 = Activo)

Definition at line 27 of file select.class.php.

References RMFormElement\setCaption(), and RMFormElement\setName().

Here is the call graph for this function:

Member Function Documentation

RMFormSelect::addOption (   $value,
  $caption,
  $select = 0,
  $disabled = false,
  $style = '' 
)

Agrega una nueva opción al menú select. Una nueva opción equivale a <option ...>...</option>.

Parameters
mixed$valueValor de la opción
string$textTexto que mostrará la opción
int$select1 selecciona por defecto la opción.
bol$disabledMustra como inactiva esta opción.

Definition at line 56 of file select.class.php.

References $rtn, and RMFormElement\getName().

Here is the call graph for this function:

RMFormSelect::addOptionsArray (   $options)

Agrega multiples elementos al campo select

Parameters
array$optionsarray de opciones

Definition at line 69 of file select.class.php.

References $options, $rtn, and RMFormElement\getName().

Here is the call graph for this function:

RMFormSelect::getOptions ( )

Devuelve el array de opciones del elemento.

Returns
array

Definition at line 95 of file select.class.php.

References $_options.

RMFormSelect::getRows ( )

Devuelve el número de filas del elemento

Returns
int

Definition at line 45 of file select.class.php.

References $_rows.

RMFormSelect::render ( )

Genera el código HTML para este elemento.

Returns
string

Definition at line 102 of file select.class.php.

References $rtn, RMFormElement\getClass(), RMFormElement\getExtra(), and RMFormElement\id().

Here is the call graph for this function:

RMFormSelect::setRows (   $value)

Establece el número de filas del elemento. Este valor es utilizado cuando $_multi esta establecido a 1

Parameters
int$valueNúmero de filas.

Definition at line 38 of file select.class.php.

RMFormSelect::setSelected (   $index)

Establece una opción como seleccionada

Definition at line 83 of file select.class.php.

Member Data Documentation

RMFormSelect::$_multi = 0
private

Definition at line 17 of file select.class.php.

RMFormSelect::$_options = array()
private

Definition at line 18 of file select.class.php.

Referenced by getOptions().

RMFormSelect::$_rows = 5
private

Definition at line 16 of file select.class.php.

Referenced by getRows().

RMFormSelect::$_selected = null
private

Definition at line 19 of file select.class.php.


The documentation for this class was generated from the following file: