MIOLO26
|
Membros públicos | |
__construct ($action='') | |
__set ($name, $value) | |
__get ($name) | |
onLoad () | |
createFields () | |
isAjaxCall () | |
registerMethod () | |
addValidator ($validator) | |
setValidators ($validators) | |
setAjaxFields ($fields, $responseControl) | |
isSubmitted () | |
setAlternate ($color0, $color1) | |
setFocus ($fieldName) | |
getFormFields () | |
getFormValue ($name, $value=NULL) | |
setFormValue ($name, $value) | |
onSubmit ($jscode) | |
addJsCode ($jscode) | |
setAction ($action) | |
setFields ($fields) | |
addField ($field, $hint=false) | |
addFields ($fields) | |
addButton ($button) | |
setButtons ($buttons) | |
setButtonLabel ( $index, $label) | |
showReturn ( $state) | |
setShowReturnButton ( $state) | |
setShowPostButton ( $state) | |
showReset ( $state) | |
setShowResetButton ( $state) | |
getShowHints () | |
setShowHints ( $state) | |
showHints ( $state) | |
getFieldList () | |
clearFields () | |
clearField ($name) | |
clearButtons () | |
validate () | |
error ( $err) | |
addError ($err) | |
hasErrors () | |
addInfo ($info) | |
hasInfos () | |
addAlert ($alert) | |
hasAlerts () | |
collectInput ($data) | |
getData () | |
setData (MBusiness $data) | |
getFieldValue ($name, $value=false) | |
setFieldValue ($name, $value) | |
setFieldValidator ($name, $value) | |
& | getField ($name) |
& | getButton ($name) |
& | getPage () |
setPage ($page) | |
setFieldAttr ($name, $attr, $value) | |
getFieldAttr ($name, $attr, $index=NULL) | |
setButtonAttr ($name, $attr, $value) | |
setResponse ($controls, $element='', $generateFormLayout=false) | |
getCloseWindow () | |
setLabelWidth ($width) | |
setFieldsReadOnly ($readOnly=true) | |
setFieldReadOnly ($field, $readOnly=true) | |
submit_button () | |
generateErrors () | |
generateInfos () | |
generateAlerts () | |
generateBody () | |
generateFooter () | |
generateLayoutFields (&$hidden) | |
getFieldValidator ($name) | |
generateLayoutField ($f, &$hidden=array()) | |
setJsValidationEnabled ($jsValidationEnabled) | |
getJsValidationEnabled () | |
generateButtons () | |
generateHiddenFields ($hidden) | |
generateScript () | |
generateInner () | |
Membros públicos herdados de MContainerControl | |
__clone () | |
addControl ($control) | |
insertControl ($control, $pos=0) | |
setControl ($control, $pos=0) | |
setControls ($controls) | |
getControls () | |
getControl ($pos) | |
getControlById ($id) | |
findControlById ($id) | |
setControlById ($control, $id) | |
clearControls () | |
Membros públicos herdados de MDiv | |
__construct ( $name=NULL, $content=' ', $class=NULL, $attributes=NULL) | |
generate () | |
Membros públicos herdados de MControl | |
setName ($name) | |
setId ($id) | |
getId () | |
getName () | |
getUniqueId () | |
setClass ($cssClass, $add=TRUE) | |
insertClass ( $cssClass) | |
addStyleFile ( $styleFile) | |
getClass () | |
addStyle ($name, $value) | |
setStyle ($style) | |
getStyle () | |
getBoxStyle () | |
setPosition ($left, $top, $position='absolute') | |
setWidth ($value) | |
setHeight ($value) | |
setColor ($value) | |
setVisibility ($value) | |
setFont ($value) | |
getBox () | |
setBoxId ( $id) | |
setBoxClass ( $cssClass, $add=true) | |
getBoxClass () | |
setBoxAttributes ($attr) | |
getBoxAttributes () | |
generateBox ( $content) | |
addAttribute ( $name, $value='') | |
setAttribute ( $name, $value) | |
getAttribute ( $name) | |
setAttributes ($attr) | |
attributes ( $mergeDuplicates=false) | |
getAttributes ( $mergeDuplicates=false) | |
setReadOnly ($status) | |
setEnabled ($state) | |
setJsHint ( $hint) | |
setHint ( $hint) | |
setCaption ($caption) | |
setHTMLTitle ($title) | |
addBoxStyle ($name, $value) | |
eventHandler () | |
attachEventHandler ( $name, $handler, $param=NULL) | |
addEvent ($event, $handler, $preventDefault=true) | |
hasEvent ($event) | |
generateEvent () | |
setContent ($inner) | |
setInner ($inner) | |
getInner () | |
getRender ( $method) | |
getInnerToString () | |
getCSSP () | |
__toString () | |
Membros públicos herdados de MComponent | |
getManager () | |
Campos de Dados | |
$method | |
$buttons | |
$fields = array() | |
$return | |
$reset | |
$styles | |
$width | |
$enctype | |
$validations | |
$defaultButton | |
$errors = array() | |
$infos = array() | |
$alerts = array() | |
$layout | |
$zebra = false | |
$labelWidth = NULL | |
$focus = '' | |
$ajax | |
$cp | |
$cssForm = false | |
$cssButtons | |
Campos de Dados herdados de MContainerControl | |
$controls | |
$controlsId | |
Campos de Dados herdados de MControl | |
$id | |
$uniqueId | |
$enabled | |
$style | |
$attrs | |
$attributes | |
$maintainState | |
$readonly | |
$visible | |
$caption | |
$jsHint | |
$hint | |
$cssp | |
$inner | |
$parent | |
$eventHandlers | |
$painter | |
$event | |
$formId | |
const | ALIGN_CENTER = 'center' |
const | ALIGN_LEFT = 'left' |
const | ALIGN_RIGHT = 'right' |
const | FORM_MODE_WHOLE_ROW = 0 |
const | FORM_MODE_SHOW_SIDE = 1 |
const | FORM_MODE_SHOW_ABOVE = 2 |
const | FORM_MODE_SHOW_NBSP = 3 |
$formMode | |
Campos de Dados herdados de MComponent | |
$manager | |
$page | |
$owner | |
$name | |
$className | |
Atributos Públicos Estáticos | |
static | $showHints = true |
static | $fieldNum = 0 |
Atributos Públicos Estáticos herdados de MControl | |
static | $_number = 0 |
Membros protegidos | |
_getFormFieldValue ($field) | |
Membros protegidos herdados de MContainerControl | |
_AddControl ($control, $pos=0, $op='add') | |
Membros protegidos herdados de MControl | |
_addStyle ($name, $value) | |
Atributos Protegidos | |
$action | |
__construct | ( | $action = '' | ) |
This is the constructor of the MBaseForm class. It takes an action url as optional parameter. The action URL is typically obtained by calling the MIOLO->getActionURL()
method.
$action | (string) the URL for the forms ACTION attribute. |
Reimplementado de MContainerControl.
__get | ( | $name | ) |
Brief Description. Complete Description.
$name | (tipo) desc |
Reimplementado de MControl.
__set | ( | $name, | |
$value ) |
Brief Description. Complete Description.
$name | (tipo) desc |
$value | (tipo) desc |
Reimplementado de MControl.
|
protected |
Brief Description. Complete Description.
$field | (tipo) desc |
addAlert | ( | $alert | ) |
Register an alert related to the form
(mixed) | $alert Message string or array of messages |
addButton | ( | $button | ) |
Add button to the form. This method adds a button to the form. Existing buttons will remaing unchanged.
(MButton) | $btn Button object |
addError | ( | $err | ) |
Adds the related form error
(mixed) | $err Error message string or array of messages |
addField | ( | $field, | |
$hint = false ) |
Adds a single field to the list of form fields and optionally adds a hint text for the field.
(object) | $field Form field object |
(string) | $hint Optional hinto for the form field |
addFields | ( | $fields | ) |
addInfo | ( | $info | ) |
Register an information related to the form
(mixed) | $info Information message string or array of messages |
addJsCode | ( | $jscode | ) |
Brief Description. Complete Description.
$jscode | (tipo) desc |
addValidator | ( | $validator | ) |
Brief Description. Complete Description.
$validator | (tipo) desc |
clearButtons | ( | ) |
Remove existing buttons on the form.
clearField | ( | $name | ) |
clearFields | ( | ) |
collectInput | ( | $data | ) |
Get form data and put it into the classmembers
createFields | ( | ) |
error | ( | $err | ) |
Regiter the error Registers the error related to the form
$err | (tipo) desc |
generateAlerts | ( | ) |
Generate a MPrompt object with all the alerts added to $this->alerts
generateBody | ( | ) |
Brief Description. Complete Description.
Reimplementado em MIndexedForm e MTabbedForm2.
generateButtons | ( | ) |
generateErrors | ( | ) |
Brief Description. Complete Description.
generateFooter | ( | ) |
generateHiddenFields | ( | $hidden | ) |
generateInfos | ( | ) |
Brief Description. Complete Description.
generateInner | ( | ) |
Reimplementado de MContainerControl.
Reimplementado em MCompoundForm e MForm.
generateLayoutField | ( | $f, | |
& | $hidden = array() ) |
Generate field according to form layout.
mixed | $f | Field or array of fields. |
array | $hidden | Array of hidden fields. |
generateLayoutFields | ( | & | $hidden | ) |
Brief Description. Complete Description.
&$hidden | (tipo) desc |
generateScript | ( | ) |
Generate form specific script code
& getButton | ( | $name | ) |
getCloseWindow | ( | ) |
getData | ( | ) |
& getField | ( | $name | ) |
Get a reference for a form field
getFieldAttr | ( | $name, | |
$attr, | |||
$index = NULL ) |
Get a form field's attribute value
Reimplementado em MForm.
getFieldList | ( | ) |
Returns form fields list. This is a placeholder function to bu the form's field list. It is excpected, that the form returns a scalar list of all defined fields which carry a form field value. Thus, form elements of decorative purpose only should be omitted.
Derived classes such as TabbedForm
override this function to provide the list of fields independently of the form's layout.
Reimplementado em MTabbedForm e MTabbedForm2.
getFieldValidator | ( | $name | ) |
getFieldValue | ( | $name, | |
$value = false ) |
Obtains a form field's value
Reimplementado em MForm.
getFormFields | ( | ) |
Obtains a submitted form fields's values and sets the array fields Uses $page->request
getFormValue | ( | $name, | |
$value = NULL ) |
Obtains a submitted form field's value. This is a static function.
(string) | $name |
(string) | $value |
$HTTP_POST_VARS
getJsValidationEnabled | ( | ) |
& getPage | ( | ) |
Get a reference for page
getShowHints | ( | ) |
Form's hints visibility. This function returns the visibility of the form's hint texts.
hasAlerts | ( | ) |
Returns the number of alert messages
hasErrors | ( | ) |
Returns the number of error messages or 0 if no errors exist
hasInfos | ( | ) |
Returns the number of info messages or 0, if no info exist
isAjaxCall | ( | ) |
Brief Description. Complete Description.
isSubmitted | ( | ) |
Detects if a form has been submitted.
onLoad | ( | ) |
onSubmit | ( | $jscode | ) |
Adds JavaScript code which is to be executed, when the form is submitted. When the form is generated, and any JS code has been registered using this function, an OnSubmit
handler is dynamically generated where the code is placed.
The generated code looks like the following where stmt stands for the registered statments
(string) | $jscode Javascript code |
registerMethod | ( | ) |
Deprecated; only for compatibility with olf MFormAjax. Complete Description.
setAction | ( | $action | ) |
Sets the action URL for this form. This is the URL to which the form data will be submitted. Usually, the URL is obtained by the GetActionURL of the MIOLO class.
(string) | $action URL of the action |
setAjaxFields | ( | $fields, | |
$responseControl ) |
Brief Description. Complete Description.
$validators | (tipo) desc |
setAlternate | ( | $color0, | |
$color1 ) |
Detects if a form has been submitted.
setButtonAttr | ( | $name, | |
$attr, | |||
$value ) |
Set a form field's attribute a value
Reimplementado em MForm.
setButtonLabel | ( | $index, | |
$label ) |
Set the buttons labels. This function is mainly used, to change the labels of the form's default buttons for submit and return.
(integer) | $index The 0 based index of the button |
(string) | $label The new button label |
setButtons | ( | $buttons | ) |
Sets the form buttons. This method adds buttons to the form, but first removes existing ones.
(mixed) | $buttons MButton object or array of MButtons |
setData | ( | MBusiness | $data | ) |
setFieldAttr | ( | $name, | |
$attr, | |||
$value ) |
Set a form field's attribute a value
Reimplementado em MForm.
setFieldReadOnly | ( | $field, | |
$readOnly = true ) |
Set a field as read-only.
object | $field | MControl instance. |
boolean | $readOnly | Whether is read-only. |
setFields | ( | $fields | ) |
This function is used to set an array of fields for the form.
(array) | $fields Fields array |
setFieldsReadOnly | ( | $readOnly = true | ) |
Set all fields as read-only.
boolean | $readOnly | Whether is read-only. |
setFieldValidator | ( | $name, | |
$value ) |
Set a form field's validator
Reimplementado em MForm.
setFieldValue | ( | $name, | |
$value ) |
Set a form field's value
Reimplementado em MForm.
setFocus | ( | $fieldName | ) |
setFormValue | ( | $name, | |
$value ) |
Sets the content of a form field to the specified value. The function does this by setting both, the field's value member and the global $_POST
to remain consistency between the values.
(string) | $name Field name |
(string) | $value Value to set to the field |
setJsValidationEnabled | ( | $jsValidationEnabled | ) |
boolean | $jsValidationEnabled | Define whether the form must validate data via JavaScript. |
setLabelWidth | ( | $width | ) |
Renderize
(integer) | $width |
setPage | ( | $page | ) |
Set reference for page
Reimplementado em MForm.
setResponse | ( | $controls, | |
$element = '', | |||
$generateFormLayout = false ) |
Set a Ajax response
setShowHints | ( | $state | ) |
Set form's hints visibility. This function can be used to show or hide the form's hint texts. Each form element may have a hint text associated with it. Using this method, one can enable/disable the display of the texts. This may be useful for implementing kind of an beginner/expert mode.
(boolean) | $state The visible state of the hint texts |
setShowPostButton | ( | $state | ) |
Post button visibility. Use this method to set the visibility of the Post Button.
(boolean) | $state The visible state of the Post Button |
setShowResetButton | ( | $state | ) |
Reset button visibility. This function can be used to show or hide the form's reset button.
(boolean) | $state The visible state of the reset button |
setShowReturnButton | ( | $state | ) |
Return button visibility. Use this function to set the visibility of the form's return button.
(boolean) | $state True to show, false to not show. |
setValidators | ( | $validators | ) |
Brief Description. Complete Description.
$validators | (tipo) desc |
showHints | ( | $state | ) |
showReset | ( | $state | ) |
showReturn | ( | $state | ) |
submit_button | ( | ) |
validate | ( | ) |
Validates the form input. Check if form data is valid according to validator components added to form.
|
protected |
$ajax |
$alerts = array() |
$buttons |
$cssButtons |
$cssForm = false |
$defaultButton |
$enctype |
$errors = array() |
|
static |
$fields = array() |
$focus = '' |
$infos = array() |
$labelWidth = NULL |
$layout |
$method |
$reset |
$return |
|
static |
$styles |
$validations |
$width |
$zebra = false |