\FOFForm
FOFForm is an extension to JForm which support not only edit views but also browse (record list) and read (single record display) views based on XML forms.
Synopsis
class FOFForm
extends JForm
{
- // Inherited members from JForm
- protected $data;
- protected $errors;
- protected $name;
- protected $options;
- protected SimpleXMLElement $xml;
- protected $forms;
- public $repeat;
- // methods
- public static getInstance()
- public mixed getAttribute()
- public void loadCSSFiles()
- public void loadJSFiles()
- public JRegistry getData()
- public void setModel()
- public FOFModel getModel()
- public void setView()
- public FOFView getView()
- public array getHeaderset()
- protected mixed findHeadersByGroup()
- public mixed getHeader()
- protected mixed findHeader()
- protected mixed loadHeader()
- protected mixed loadFieldType()
- protected mixed loadHeaderType()
- protected mixed loadRuleType()
- public static array addFieldPath()
- public static array addHeaderPath()
- public static array addFormPath()
- public static array addRulePath()
- // Inherited methods from JForm
- public void __construct()
- public boolean bind()
- protected void bindLevel()
- public mixed filter()
- public array getErrors()
- public mixed getField()
- public mixed getFieldAttribute()
- public array getFieldset()
- public array getFieldsets()
- public string getFormControl()
- public array getGroup()
- public string getInput()
- public string getLabel()
- public string getName()
- public mixed getValue()
- public string getControlGroup()
- public string getControlGroups()
- public boolean load()
- public boolean loadFile()
- public boolean removeField()
- public boolean removeGroup()
- public boolean reset()
- public boolean setField()
- public boolean setFieldAttribute()
- public boolean setFields()
- public boolean setValue()
- public mixed validate()
- protected mixed filterField()
- protected mixed findField()
- protected mixed findFieldsByFieldset()
- protected mixed findFieldsByGroup()
- protected mixed findGroup()
- protected mixed loadField()
- protected mixed loadFieldType()
- protected mixed loadRuleType()
- protected boolean syncPaths()
- protected mixed validateField()
- public static array addFieldPath()
- public static array addFormPath()
- public static array addRulePath()
- public static getInstance()
- protected static void addNode()
- protected static void mergeNode()
- protected static void mergeNodes()
- public mixed getAttribute()
- public JRegistry getData()
- public SimpleXMLElement getXml()
Hierarchy
Extends
Tasks
Tasks
Line | Task |
---|---|
1836+ | Maybe we should receive all addXXXpaths attributes at once? |
Members
protected
- $data
—
The JRegistry data store for form fields during display. - $errors
—
array
The form object errors array. - $forms
—
array
Form instances. - $model
—
FOFModel
The model attached to this view - $name
—
string
The name of the form instance. - $options
—
array
The form object options for use in rendering and validation. - $view
—
FOFView
The view used to render this form - $xml
—
SimpleXMLElement
The form XML definition.
public
- $repeat
—
mixed
Alows extensions to implement repeating elements
Methods
protected
- findHeader() — Method to get a header field represented as an XML element object.
- findHeadersByGroup() — Method to get an array of <header /> elements from the form XML document which are in a control group by name.
- loadFieldType() — Proxy for {@link FOFFormHelper::loadFieldType()}.
- loadHeader() — Method to load, setup and return a FOFFormHeader object based on field data.
- loadHeaderType() — Proxy for {@link FOFFormHelper::loadHeaderType()}.
- loadRuleType() — Proxy for {@link FOFFormHelper::loadRuleType()}.
public
- addFieldPath() — Proxy for {@link FOFFormHelper::addFieldPath()}.
- addFormPath() — Proxy for FOFFormHelper::addFormPath().
- addHeaderPath() — Proxy for {@link FOFFormHelper::addHeaderPath()}.
- addRulePath() — Proxy for FOFFormHelper::addRulePath().
- getAttribute() — Returns the value of an attribute of the form itself
- getData() — Returns a reference to the protected $data object, allowing direct access to and manipulation of the form's data.
- getHeader() — Method to get a header field represented as a FOFFormHeader object.
- getHeaderset() — Method to get an array of FOFFormHeader objects in the headerset.
- getInstance() — Method to get an instance of a form.
- getModel() — Returns the FOFModel attached to this form
- getView() — Returns the FOFView attached to this form
- loadCSSFiles() — Loads the CSS files defined in the form, based on its cssfiles attribute
- loadJSFiles() — Loads the Javascript files defined in the form, based on its jsfiles attribute
- setModel() — Attaches a FOFModel to this form
- setView() — Attaches a FOFView to this form
Inherited from JForm
protected
- addNode() — Adds a new child SimpleXMLElement node to the source.
- bindLevel() — Method to bind data to the form for the group level.
- filterField() — Method to apply an input filter to a value based on field data.
- findField() — Method to get a form field represented as an XML element object.
- findFieldsByFieldset() — Method to get an array of <field /> elements from the form XML document which are in a specified fieldset by name.
- findFieldsByGroup() — Method to get an array of <field /> elements from the form XML document which are in a control group by name.
- findGroup() — Method to get a form field group represented as an XML element object.
- loadField() — Method to load, setup and return a JFormField object based on field data.
- loadFieldType() — Proxy for {@link JFormHelper::loadFieldType()}.
- loadRuleType() — Proxy for JFormHelper::loadRuleType().
- mergeNode() — Update the attributes of a child node
- mergeNodes() — Merges new elements into a source <fields> element.
- syncPaths() — Method to synchronize any field, form or rule paths contained in the XML document.
- validateField() — Method to validate a JFormField object based on field data.
public
- addFieldPath() — Proxy for {@link JFormHelper::addFieldPath()}.
- addFormPath() — Proxy for JFormHelper::addFormPath().
- addRulePath() — Proxy for JFormHelper::addRulePath().
- bind() — Method to bind data to the form.
- filter() — Method to filter the form data.
- getAttribute() — Returns the value of an attribute of the form itself
- getControlGroup() — Method to get a control group with label and input.
- getControlGroups() — Method to get all control groups with label and input of a fieldset.
- getData() — Getter for the form data
- getErrors() — Return all errors, if any.
- getField() — Method to get a form field represented as a JFormField object.
- getFieldAttribute() — Method to get an attribute value from a field XML element. If the attribute doesn't exist or is null then the optional default value will be used.
- getFieldset() — Method to get an array of JFormField objects in a given fieldset by name. If no name is given then all fields are returned.
- getFieldsets() — Method to get an array of fieldset objects optionally filtered over a given field group.
- getFormControl() — Method to get the form control. This string serves as a container for all form fields. For example, if there is a field named 'foo' and a field named 'bar' and the form control is empty the fields will be rendered like: <input name="foo" /> and <input name="bar" />. If the form control is set to 'joomla' however, the fields would be rendered like: <input name="joomla[foo]" /> and <input name="joomla[bar]" />.
- getGroup() — Method to get an array of JFormField objects in a given field group by name.
- getInput() — Method to get a form field markup for the field input.
- getInstance() — Method to get an instance of a form.
- getLabel() — Method to get the label for a field input.
- getName() — Method to get the form name.
- getValue() — Method to get the value of a field.
- getXml() — Method to get the XML form object
- load() — Method to load the form description from an XML string or object.
- loadFile() — Method to load the form description from an XML file.
- removeField() — Method to remove a field from the form definition.
- removeGroup() — Method to remove a group from the form definition.
- reset() — Method to reset the form data store and optionally the form XML definition.
- setField() — Method to set a field XML element to the form definition. If the replace flag is set then the field will be set whether it already exists or not. If it isn't set, then the field will not be replaced if it already exists.
- setFieldAttribute() — Method to set an attribute value for a field XML element.
- setFields() — Method to set some field XML elements to the form definition. If the replace flag is set then the fields will be set whether they already exists or not. If it isn't set, then the fields will not be replaced if they already exist.
- setValue() — Method to set the value of a field. If the field does not exist in the form then the method will return false.
- validate() — Method to validate form data.