Class FOFForm

Description

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.

  • since: 2.0

Located in /libraries/fof/form/form.php (line 19)

JForm
   |
   --FOFForm
Variable Summary
Method Summary
 static array addFieldPath ([mixed $new = null])
 static array addFormPath ([mixed $new = null])
 static array addHeaderPath ([mixed $new = null])
 static array addRulePath ([mixed $new = null])
 static object FOFForm getInstance (string $name, [string $data = null], [array $options = array()], [string $replace = true], [string $xpath = false])
 mixed findHeader (string $name, [string $group = null])
 mixed &findHeadersByGroup ([mixed $group = null], [boolean $nested = false])
 mixed getAttribute (string $attribute, [mixed $default = null])
 mixed getHeader (string $name, [string $group = null], [mixed $value = null])
 array getHeaderset ()
 void loadCSSFiles ()
 mixed loadFieldType (string $type, [boolean $new = true])
 mixed loadHeader (string $element, [string $group = null], [mixed $value = null])
 mixed loadHeaderType (string $type, [boolean $new = true])
 void loadJSFiles ()
 mixed loadRuleType (string $type, [boolean $new = true])
 void setModel (FOFModel &$model)
 void setView (FOFView &$view)
Variables
FOFModel $model (line 26)

The model attached to this view

  • access: protected
FOFView $view (line 33)

The view used to render this form

  • access: protected

Inherited Variables

Inherited from JForm

JForm::$data
JForm::$errors
JForm::$forms
JForm::$name
JForm::$options
JForm::$repeat
JForm::$xml
Methods
static addFieldPath (line 571)

Proxy for FOFFormHelper::addFieldPath().

  • return: The list of paths that have been added.
  • since: 2.0
  • access: public
static array addFieldPath ([mixed $new = null])
  • mixed $new: A path or array of paths to add.

Redefinition of:
JForm::addFieldPath()
Proxy for JFormHelper::addFieldPath().
static addFormPath (line 600)

Proxy for FOFFormHelper::addFormPath().

  • return: The list of paths that have been added.
  • see: FOFFormHelper::addFormPath()
  • since: 2.0
  • access: public
static array addFormPath ([mixed $new = null])
  • mixed $new: A path or array of paths to add.

Redefinition of:
JForm::addFormPath()
Proxy for JFormHelper::addFormPath().
static addHeaderPath (line 585)

Proxy for FOFFormHelper::addHeaderPath().

  • return: The list of paths that have been added.
  • since: 2.0
  • access: public
static array addHeaderPath ([mixed $new = null])
  • mixed $new: A path or array of paths to add.
static addRulePath (line 615)

Proxy for FOFFormHelper::addRulePath().

  • return: The list of paths that have been added.
  • see: FOFFormHelper::addRulePath()
  • since: 2.0
  • access: public
static array addRulePath ([mixed $new = null])
  • mixed $new: A path or array of paths to add.

Redefinition of:
JForm::addRulePath()
Proxy for JFormHelper::addRulePath().
static getInstance (line 51)

Method to get an instance of a form.

  • return: instance.
  • since: 2.0
  • throws: InvalidArgumentException if no data provided.
  • throws: RuntimeException if the form could not be loaded.
  • access: public
static object FOFForm getInstance (string $name, [string $data = null], [array $options = array()], [string $replace = true], [string $xpath = false])
  • string $name: The name of the form.
  • string $data: The name of an XML file or string to load as the form definition.
  • array $options: An array of form options.
  • string $replace: Flag to toggle whether form fields should be replaced if a field already exists with the same group/name.
  • string $xpath: An optional xpath to search for the fields.

Redefinition of:
JForm::getInstance()
Method to get an instance of a form.
findHeader (line 390)

Method to get a header field represented as an XML element object.

  • return: The XML element object for the field or boolean false on error.
  • since: 2.0
  • access: protected
mixed findHeader (string $name, [string $group = null])
  • string $name: The name of the form field.
  • string $group: The optional dot-separated form group path on which to find the field.
findHeadersByGroup (line 285)

Method to get an array of <header /> elements from the form XML document which are in a control group by name.

  • return: Boolean false on error or array of SimpleXMLElement objects.
  • since: 2.0
  • access: protected
mixed &findHeadersByGroup ([mixed $group = null], [boolean $nested = false])
  • mixed $group: The optional dot-separated form group path on which to find the fields. Null will return all fields. False will return fields not in a group.
  • boolean $nested: True to also include fields in nested groups that are inside of the group for which to find fields.
getAttribute (line 99)

Returns the value of an attribute of the form itself

  • since: 2.0
  • access: public
mixed getAttribute (string $attribute, [mixed $default = null])
  • string $attribute: The name of the attribute
  • mixed $default: Optional default value to return

Redefinition of:
JForm::getAttribute()
Returns the value of an attribute of the form itself
getData (line 184)

Returns a reference to the protected $data object, allowing direct access to and manipulation of the form's data.

  • return: The form's data registry
  • since: 2.0
  • access: public
JRegistry getData ()

Redefinition of:
JForm::getData()
Getter for the form data
getHeader (line 360)

Method to get a header field represented as a FOFFormHeader object.

  • return: The FOFFormHeader object for the field or boolean false on error.
  • since: 2.0
  • access: public
mixed getHeader (string $name, [string $group = null], [mixed $value = null])
  • string $name: The name of the header field.
  • string $group: The optional dot-separated form group path on which to find the field.
  • mixed $value: The optional value to use as the default for the field.
getHeaderset (line 240)

Method to get an array of FOFFormHeader objects in the headerset.

  • return: The array of FOFFormHeader objects in the headerset.
  • since: 2.0
  • access: public
array getHeaderset ()
getModel (line 206)

Returns the FOFModel attached to this form

  • access: public
FOFModel &getModel ()
getView (line 228)

Returns the FOFView attached to this form

  • access: public
FOFView &getView ()
loadCSSFiles (line 120)

Loads the CSS files defined in the form, based on its cssfiles attribute

  • since: 2.0
  • access: public
void loadCSSFiles ()
loadFieldType (line 526)

Proxy for FOFFormHelper::loadFieldType().

  • return: FOFFormField object on success, false otherwise.
  • since: 2.0
  • access: protected
mixed loadFieldType (string $type, [boolean $new = true])
  • string $type: The field type.
  • boolean $new: Flag to toggle whether we should get a new instance of the object.

Redefinition of:
JForm::loadFieldType()
Proxy for JFormHelper::loadFieldType().
loadHeader (line 483)

Method to load, setup and return a FOFFormHeader object based on field data.

  • return: The FOFFormHeader object for the field or boolean false on error.
  • since: 2.0
  • access: protected
mixed loadHeader (string $element, [string $group = null], [mixed $value = null])
  • string $element: The XML element object representation of the form field.
  • string $group: The optional dot-separated form group path on which to find the field.
  • mixed $value: The optional value to use as the default for the field.
loadHeaderType (line 541)

Proxy for FOFFormHelper::loadHeaderType().

  • return: FOFFormHeader object on success, false otherwise.
  • since: 2.0
  • access: protected
mixed loadHeaderType (string $type, [boolean $new = true])
  • string $type: The field type.
  • boolean $new: Flag to toggle whether we should get a new instance of the object.
loadJSFiles (line 159)

Loads the Javascript files defined in the form, based on its jsfiles attribute

  • since: 2.0
  • access: public
void loadJSFiles ()
loadRuleType (line 557)

Proxy for FOFFormHelper::loadRuleType().

  • return: JFormRule object on success, false otherwise.
  • see: FOFFormHelper::loadRuleType()
  • since: 2.0
  • access: protected
mixed loadRuleType (string $type, [boolean $new = true])
  • string $type: The rule type.
  • boolean $new: Flag to toggle whether we should get a new instance of the object.

Redefinition of:
JForm::loadRuleType()
Proxy for JFormHelper::loadRuleType().
setModel (line 196)

Attaches a FOFModel to this form

  • access: public
void setModel (FOFModel &$model)
  • FOFModel &$model: The model to attach to the form
setView (line 218)

Attaches a FOFView to this form

  • access: public
void setView (FOFView &$view)
  • FOFView &$view: The view to attach to the form

Inherited Methods

Inherited From JForm

 JForm::__construct()
 JForm::addFieldPath()
 JForm::addFormPath()
 JForm::addNode()
 JForm::addRulePath()
 JForm::bind()
 JForm::bindLevel()
 JForm::filter()
 JForm::filterField()
 JForm::findField()
 JForm::findFieldsByFieldset()
 JForm::findFieldsByGroup()
 JForm::findGroup()
 JForm::getAttribute()
 JForm::getControlGroup()
 JForm::getControlGroups()
 JForm::getData()
 JForm::getErrors()
 JForm::getField()
 JForm::getFieldAttribute()
 JForm::getFieldset()
 JForm::getFieldsets()
 JForm::getFormControl()
 JForm::getGroup()
 JForm::getInput()
 JForm::getInstance()
 JForm::getLabel()
 JForm::getName()
 JForm::getValue()
 JForm::getXml()
 JForm::load()
 JForm::loadField()
 JForm::loadFieldType()
 JForm::loadFile()
 JForm::loadRuleType()
 JForm::mergeNode()
 JForm::mergeNodes()
 JForm::removeField()
 JForm::removeGroup()
 JForm::reset()
 JForm::setField()
 JForm::setFieldAttribute()
 JForm::setFields()
 JForm::setValue()
 JForm::syncPaths()
 JForm::validate()
 JForm::validateField()

Documentation generated on Tue, 19 Nov 2013 15:03:36 +0100 by phpDocumentor 1.4.3