XOOPS RMCommon Utilities
2.1.8.91RC
|
Public Member Functions | |
__construct ($title, $name, $action, $method='post', $addtoken=true) | |
addElement (&$element, $required=false, $css_type='') | |
addValidateField ($name, $type='', $required=0, $text='') | |
clear ($field= '') | |
cssfile () | |
display ($js=true) | |
& | element ($name) |
elements () | |
evenClass ($value) | |
footClass ($value) | |
getAction () | |
getExtra () | |
getName () | |
getTinyCSS () | |
getTitle () | |
headClass ($value) | |
method () | |
oddClass ($value) | |
render ($form_tag=true) | |
renderForTemplate () | |
setAction ($action) | |
setExtra ($extra) | |
setMethod ($method) | |
setName ($name) | |
setRowExtras ($extra, $id) | |
setTinyTags ($tags) | |
setTitle ($value) | |
styles ($style, $id) | |
tableClass ($value) | |
thClass ($value) | |
tinyCSS ($url) | |
tinyTags () | |
Protected Attributes | |
$_action = '' | |
$_extra = '' | |
$_method = '' | |
$_name = '' | |
$_title = '' | |
Private Member Functions | |
getType ($type) | |
Private Attributes | |
$_addtoken = true | |
$_alertColor = '#FF0000' | |
$_evenClass = 'even' | |
$_evenStyle ='' | |
$_fields = array() | |
$_footClass = 'foot' | |
$_footStyle ='' | |
$_headClass = 'head' | |
$_headStyle ='' | |
$_oddClass = 'odd' | |
$_oddSpanStyle | |
$_oddStyle ='' | |
$_okColor = '#000' | |
$_othervalidates = '' | |
$_tableClass = 'outer' | |
$_thClass = '' | |
$_thStyle ='' | |
$_tinycss = '' | |
$_tinytheme = 'advanced' | |
$editores = '' | |
$row_extras = array() | |
$tiny_valid_tags = 'a[name|href|target|title|onclick],code[class,id],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|longdesc|style],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]' | |
Esta clase controla la generación de formularios automáticamente.
Esta clase es un sustituto par ala clase XoopsForm
Definition at line 78 of file form.class.php.
RMForm::__construct | ( | $title, | |
$name, | |||
$action, | |||
$method = 'post' , |
|||
$addtoken = true |
|||
) |
string | $title | Titulo que se desplegar en la tabla del formulario |
string | $name | Nombre del formulario |
string | $action | Post o Get (Default post) |
bool | $addtoken | Crea el cdigo de seguridad de la sesin con el formulario (default true) |
Definition at line 118 of file form.class.php.
References $action, $xoopsSecurity, addElement(), RMTemplate\get(), and RMCURL.
RMForm::addElement | ( | & | $element, |
$required = false , |
|||
$css_type = '' |
|||
) |
Agregamos nuevos elementos Estos elementos son instanacias de algun elemento de formulario
RMFormElement | $element | |
bool | $required | true = Elemento requerido |
string | $css_type | Content Type: email,url, etc. |
Definition at line 242 of file form.class.php.
References $ret.
Referenced by __construct().
RMForm::addValidateField | ( | $name, | |
$type = '' , |
|||
$required = 0 , |
|||
$text = '' |
|||
) |
Agrega una cadena para comprobar un campo
Definition at line 355 of file form.class.php.
RMForm::clear | ( | $field = '' | ) |
Limpiamos el array de elementos creados con la funcin addElement()
Definition at line 223 of file form.class.php.
References $field.
RMForm::cssfile | ( | ) |
Return the path for default style sheet
Definition at line 216 of file form.class.php.
RMForm::display | ( | $js = true | ) |
Escribe directamente el conetnido HTML con la funcin echo
Definition at line 479 of file form.class.php.
References RMTemplate\get_template().
& RMForm::element | ( | $name | ) |
Definition at line 270 of file form.class.php.
RMForm::elements | ( | ) |
Definition at line 266 of file form.class.php.
References $_fields.
RMForm::evenClass | ( | $value | ) |
Extablece la clase 'CSS' para celdas impares
string | $value |
Definition at line 304 of file form.class.php.
RMForm::footClass | ( | $value | ) |
Estilo 'CSS' para el pie del formulario
string | $value |
Definition at line 318 of file form.class.php.
RMForm::getAction | ( | ) |
Recupera el destion del formulario
Definition at line 209 of file form.class.php.
References $_action.
RMForm::getExtra | ( | ) |
Devuelve el contenido extra del tag FORM
Definition at line 168 of file form.class.php.
References $_extra.
RMForm::getName | ( | ) |
Recupera el nombre del formulario
Definition at line 195 of file form.class.php.
References $_name.
RMForm::getTinyCSS | ( | ) |
Definition at line 369 of file form.class.php.
References $tiny, and TinyEditor\getInstance().
RMForm::getTitle | ( | ) |
Obtiene el ttulo del formulario
Definition at line 151 of file form.class.php.
References $_title.
|
private |
Funcin para devolver el tipo correcto de campo para la validacin del Formulario Esta funcin acepta como parmetro uno de los siguientes valores: Email, Num, Range y Select. Un rango debe proporcionarse con el formato RangeX,Y
string | $type |
Definition at line 463 of file form.class.php.
References $type, and elseif().
RMForm::headClass | ( | $value | ) |
Establece la clase 'CSS' para usar para las celdas marcadas como 'pseudo-encabezados'
string | $value | Nombre de la clase |
Definition at line 297 of file form.class.php.
RMForm::method | ( | ) |
Definition at line 181 of file form.class.php.
References $_method.
RMForm::oddClass | ( | $value | ) |
Extablece la clase 'CSS' para celdas pares
string | $value |
Definition at line 311 of file form.class.php.
RMForm::render | ( | $form_tag = true | ) |
Generamos el cdigo HTML del formulario. Esta funcin automticamente llama a la funcin render() de los elementos del formulario (EXMFormElement) para generar a su vez su propia salida HTML
Generamos el cdigo JavaScript para comprobación del formulario
Definition at line 391 of file form.class.php.
References RMTemplate\get_template().
RMForm::renderForTemplate | ( | ) |
Crea el formulario y lo asigna a una matriz para un mayor control sobre la presentación de los campos
string | Nombre de la variable smarty |
string | Plantilla que se utilizará |
bool | Incluir javascript |
Definition at line 408 of file form.class.php.
References $_title, $field, $GLOBALS, $rtn, and __().
RMForm::setAction | ( | $action | ) |
Establece el script donde se procesar el formulario
string | $action | Url del documento destino |
Definition at line 202 of file form.class.php.
References $action.
RMForm::setExtra | ( | $extra | ) |
Establece la informacin adicional del formulario. Mediante esta funcin se puede pasar informacin de estilos tipos enctype u otra informacin adicional que se desee incluir dentro del tag <form ..>
string | $extra |
Definition at line 161 of file form.class.php.
RMForm::setMethod | ( | $method | ) |
Establece el mtodo de envo del formulario el cual puede ser 'POST' o 'GET'
string | $method | (post o get) |
Definition at line 176 of file form.class.php.
RMForm::setName | ( | $name | ) |
Establece el nombre del formulario
string | $name |
Definition at line 188 of file form.class.php.
RMForm::setRowExtras | ( | $extra, | |
$id | |||
) |
Establece información extra para las diferentes filas de la tabla generada por la clase. Estas deben llamarse por medio de su id. Mucho cuidado con la utilización de este método pues no se hace nignuna comprobación especial de los parámetros pasados.
string | Datos extra |
string | Id de la fila. Debe iniciar con row_ |
Definition at line 381 of file form.class.php.
References $id.
RMForm::setTinyTags | ( | $tags | ) |
Establece las etiquetas HTML válidas para Tiny
string | $tags |
Definition at line 488 of file form.class.php.
References $tiny, and TinyEditor\getInstance().
RMForm::setTitle | ( | $value | ) |
Establece o modifica el ttulo del formulario
string | $value |
Definition at line 144 of file form.class.php.
RMForm::styles | ( | $style, | |
$id | |||
) |
Establece los estilos de los diferentes elementos de la tabla
string | Estilo CSS del elemento |
string | Id del elemento (odd, even, head, th, foot, oddspan) |
Definition at line 327 of file form.class.php.
References $id.
RMForm::tableClass | ( | $value | ) |
Las siguientes funciones dan formato a la tabla creada por esta clase Establece la clase CSS de ta tabla
string | $value |
Definition at line 283 of file form.class.php.
RMForm::thClass | ( | $value | ) |
Establece la clase 'CSS' de las celdas de encabezado
$string | $value Nombre de la clase |
Definition at line 290 of file form.class.php.
RMForm::tinyCSS | ( | $url | ) |
Set de funciones útiles únicamente con el editor TinyMCE
Definition at line 365 of file form.class.php.
References $tiny, $url, and TinyEditor\getInstance().
RMForm::tinyTags | ( | ) |
Definition at line 492 of file form.class.php.
References $tiny, and TinyEditor\getInstance().
|
protected |
Definition at line 82 of file form.class.php.
Referenced by getAction().
|
private |
Definition at line 93 of file form.class.php.
|
private |
Definition at line 102 of file form.class.php.
|
private |
Definition at line 90 of file form.class.php.
|
private |
Definition at line 96 of file form.class.php.
|
protected |
Definition at line 83 of file form.class.php.
Referenced by getExtra().
|
private |
Definition at line 80 of file form.class.php.
Referenced by elements().
|
private |
Definition at line 92 of file form.class.php.
|
private |
Definition at line 99 of file form.class.php.
|
private |
Definition at line 89 of file form.class.php.
|
private |
Definition at line 97 of file form.class.php.
|
protected |
Definition at line 84 of file form.class.php.
Referenced by method().
|
protected |
Definition at line 81 of file form.class.php.
Referenced by getName().
|
private |
Definition at line 91 of file form.class.php.
|
private |
Definition at line 95 of file form.class.php.
|
private |
Definition at line 94 of file form.class.php.
|
private |
Definition at line 103 of file form.class.php.
|
private |
Definition at line 101 of file form.class.php.
|
private |
Definition at line 87 of file form.class.php.
|
private |
Definition at line 88 of file form.class.php.
|
private |
Definition at line 98 of file form.class.php.
|
private |
Definition at line 107 of file form.class.php.
|
private |
Definition at line 106 of file form.class.php.
|
protected |
Definition at line 85 of file form.class.php.
Referenced by getTitle(), and renderForTemplate().
|
private |
Definition at line 105 of file form.class.php.
|
private |
Definition at line 110 of file form.class.php.
|
private |
Definition at line 108 of file form.class.php.