constructor __construct [line 160]
method addCssClasses [line 532]
Adds one or many css-classes to the element's class-attribute.
This is simple string concatenation. You don't have to leave a blank at the start of the string to add.
Tags:
Parameters:
method addElement [line 546]
Adds a subelement to the element.
Is available but won't do anything for elements that have no container character.
Tags:
Parameters:
method determineRefiller [line 593]
Array[String] determineRefiller(
[Array[String]|null
$refiller = array()])
|
|
Returns the supposed source of refill values.
Either the provided array will be taken, or the method tries to determine the element's data source by the method of the masterform. If that fails the refiller defaults to $_POST. For internal use. Doesn't need to be overwritten or extended.
Tags:
Parameters:
method doRender [line 799]
method getId [line 376]
Return the element's html-id.
Tags:
method getLabel [line 409]
Return the element's label text.
Tags:
method getMasterElement [line 354]
Return the currently connected owner element for the element.
Tags:
method getMasterForm [line 343]
Returns the currently connected owner form for the element.
Tags:
method getName [line 387]
Return the element's html-name.
Tags:
method getSubElements [line 420]
Array[FormElement] getSubElements(
)
|
|
Return all owned elements of this element.
Tags:
method getTitle [line 398]
Return the element's html-title.
Tags:
method getValidator [line 365]
Return the currently connected validator for the element.
Tags:
method getValue [line 458]
method getValueSet [line 433]
Returns the compiled valueset for this element including the elements owned by this one.
Tags:
Parameters:
method insertElementAfter [line 567]
Searches the subelements of the element if present and inserts a given element after the first found one.
This method doesn't add an element right behind the element itself, but inserts one into the subelements if a match is found.
This method is available, but doesn't do anything for elements that have no container character.
Tags:
Parameters:
method isValid [line 472]
Answers if the element is in a valid state at the moment.
Per default an element is always valid, if a validator is added it can't be valid until it has been validated according to the rules of the validator.
Tags:
method needsUtf8Safety [line 485]
Boolean needsUtf8Safety(
)
|
|
Answers if the element needs to be treated with precautions according to possible utf-8 values.
This value is completely derived from the masterform if present, otherwise the value will be treated as utf-8 for security reasons.
Tags:
method printCssClasses [line 659]
String printCssClasses(
)
|
|
Compiles the html-class-attribute-string of the element.
Auto-includes an error-class if element is found invalid.
Tags:
method printDisabled [line 741]
Compiles the html-disabled-attribute-string of the element.
Tags:
method printId [line 614]
Compiles the html-id-attribute-string of the element.
Tags:
method printJavascriptEventHandler [line 717]
String printJavascriptEventHandler(
)
|
|
Compiles html-javascript-eventhandler-string of the element.
Tags:
method printJavascriptValidationCode [line 778]
String printJavascriptValidationCode(
)
|
|
Grabs the compiled JS-validation-code for the element from its validator, if present and returns the code as a string.
Tags:
method printMessages [line 754]
String printMessages(
[Boolean
$onlyCustomMessages = false])
|
|
Returns a string of all aggregated error messages of the element.
Makes only sense after a validation process took place.
Tags:
Parameters:
method printName [line 625]
Compiles the html-name-string of the element.
Tags:
method printNameArray [line 636]
Comiles the html-name-string of the element, if the element is part of a group of values.
Tags:
method printTabIndex [line 728]
Calculates current ongoing tabindex of the form, refreshes it and returns the proper value for the element.
Tags:
method printTitle [line 647]
Compiles the html-title-string of the element.
Tags:
method printWrapperClasses [line 680]
String printWrapperClasses(
)
|
|
Compiles a string of all classes for the tag-wrapper for the element's html-code.
Auto-includes an error-class if element is found invalid and error marking is set to full.
Tags:
method setCssClasses [line 269]
Sets the html-class-attribute for the element.
Use exactly the same notation you would use in html.
Tags:
Parameters:
method setDisabled [line 316]
method setId [line 242]
Sets the html-id for this element.
Tags:
Parameters:
method setJavascriptEventHandler [line 304]
FormElement setJavascriptEventHandler(
String
$handler, String
$reaction)
|
|
Sets a javascript-handler for the element.
If you want to use such things as "onchange" or "onclick", you can set that with this method. At the moment only one handler per element is allowed, because this is supposed to be a comfortable way of inserting little quirks and not a programming interface. If you need to do complicated things, use raw javascript or jquery and reference the element by a fitting selector.
Tags:
Parameters:
method setLabel [line 285]
Inserts a label for the element.
This is not a label in the html-sense, but to be seen as a description for the purpose of the element. The label is rendered into an own tag before the widget.
Tags:
Parameters:
method setMasterElement [line 209]
Sets the owning element for an element.
Some elements can contain others, allowing a tree structure of the form object. Every element eventually knows the form it is in, but additionally knows which element contains it, if it is not directly put into the form. For internal use. Use element->addElement() instead.
Tags:
Parameters:
method setMasterForm [line 190]
Sets the owning form for an element and by doing so inserts the element into the logical structure of the form.
For internal use. Use form->addElement() instead.
Tags:
Parameters:
method setTitle [line 255]
Sets the html-title for this element.
Tags:
Parameters:
method setUsable [line 329]
Set the element usables or disabled based on an expression.
Tags:
Parameters:
method setValidator [line 226]
Sets a validator for a value-bearing element.
By doing so you render the element invalid by default. To get it valid again you have to validate the form it is in or the element itself. A validator can be set up with a set of rules for the value of the element. If one of those rules is broken the element is treated as being invalid.
Tags:
Parameters:
method validate [line 505]
Starts validation for the element and all subelements according to the rules laid out in the element's validator.
Calculates the compiled validity-state for the element and all descendants recursively. After this call, isValid() always returns the correct calculated state.
If element has no masterform at the moment of call the validators work on default settings.
This method must be overwritten in specialized classes and called at the beginning of the overwriting method.
Tags:
Overridden in child classes as:
- InputCheckbox::validate()
- Starts the validation-process for the element.
- InputHidden::validate()
- Starts the validation-process for the element.
- InputRadio::validate()
- Starts the validation-process for the element.
- InputText::validate()
- Starts the validation-process for the element.
- Select::validate()
- Starts the validation-process for the element.
- TextArea::validate()
- Starts the validation-process for the element.