Composite field which displays a file upload box, but if a file has already been uploaded, displays a link to it and a delete option.
More...
Public Member Functions |
| __construct ($name, $value='', $options=array()) |
| Constructor.
|
| set_value ($value) |
| Sets the value of the field.
|
| render () |
| Render the element - composite element including a delete checkbox and a link to the existing file if present.
|
| __construct ($tag, $name, $value='', $options=array()) |
| Constructor.
|
| get_label () |
| Returns the field's label.
|
| get_value () |
| Returns the $_POST value for this field — cleaned to avoid XSS attacks.
|
| repopulate () |
| Repopulates this field, with the $_POST value.
|
| has_children () |
| Returns true if the element has children.
|
| remove_children () |
| Removes all HTML children of the element.
|
| add_child ($child) |
| Adds a Element as a child to this one $child = Another Html_Element or a String.
|
| add_class ($class_name) |
| Adds a class to the element.
|
| has_class ($class_name) |
| Checks if a the element has a certain class attribute.
|
| set_attr ($attr, $value) |
| Sets a attribute to this Element $attr = The attribute name 'id', 'class', etc $value = The value of the attribute.
|
| set_attrs ($attrs) |
| Set an element's attributes in one swoop...
|
| get_attr ($key) |
| Returns the value of an element's attribute, if the value is not set, returns ''.
|
| remove_attribute ($key) |
| Remove an attribute.
|
| __toString () |
| Convienience fucntion for -PHP5.1 as the magic __toString() is not available!
|
| __call ($function, $params) |
| The 'magic' call method will get/set for us invoked when the interpreter can not find a method the user is asking for.
|
| set_parameters ($arguments) |
| Set variables from an array to member fields requires $this->optional_arguments or $this->required_arguments to have been set by the subclass.
|
Composite field which displays a file upload box, but if a file has already been uploaded, displays a link to it and a delete option.