Class JModelForm

Description

Prototype form model.

Located in /libraries/joomla/application/component/modelform.php (line 24)

JObject
   |
   --JModel
      |
      --JModelForm
Direct descendents
Class Description
UsersModelLogin Rest model class for Users.
UsersModelReset Rest model class for Users.
UsersModelRemind Remind model class for Users.
UsersModelRegistration Registration model class for Users.
UsersModelProfile Profile model class for Users.
ContactModelContact
MessagesModelConfig Message configuration model.
ConfigModelComponent
ConfigModelApplication
TemplatesModelSource
MenusModelMenu Menu Item Model for Menus.
BannersModelDownload Download model.
JModelAdmin Prototype admin model.
Variable Summary
array $_forms
Method Summary
boolean checkin ([integer $pk = null])
boolean checkout ([integer $pk = null])
mixed getForm ([array $data = array()], [boolean $loadData = true])
mixed loadForm (string $name, [string $source = null], [array $options = array()], [boolean $clear = false], [string $xpath = false])
array loadFormData ()
void preprocessForm (JForm $form, mixed $data, [string $group = 'content'])
mixed validate (JForm $form, array $data, [string $group = null])
Variables
array $_forms = array() (line 32)

Array of form objects.

  • since: 11.1
  • access: protected

Inherited Variables

Inherited from JModel

JModel::$event_clean_cache
JModel::$name
JModel::$option
JModel::$state
JModel::$_db
JModel::$__state_set

Inherited from JObject

JObject::$_errors
Methods
checkin (line 43)

Method to checkin a row.

  • return: False on failure or error, true otherwise.
  • since: 11.1
  • access: public
boolean checkin ([integer $pk = null])
  • integer $pk: The numeric id of the primary key.

Redefined in descendants as:
checkout (line 85)

Method to check-out a row for editing.

  • return: False on failure or error, true otherwise.
  • since: 11.1
  • access: public
boolean checkout ([integer $pk = null])
  • integer $pk: The numeric id of the primary key.

Redefined in descendants as:
getForm (line 128)

Abstract method for getting the form from the model.

  • return: A JForm object on success, false on failure
  • abstract:
  • since: 11.1
  • access: public
mixed getForm ([array $data = array()], [boolean $loadData = true])
  • array $data: Data for the form.
  • boolean $loadData: True if the form is to load its own data (default case), false if not.

Redefined in descendants as:
loadForm (line 144)

Method to get a form object.

  • return: JForm object on success, False on error.
  • see: JForm
  • since: 11.1
  • access: protected
mixed loadForm (string $name, [string $source = null], [array $options = array()], [boolean $clear = false], [string $xpath = false])
  • string $name: The name of the form.
  • string $source: The form source. Can be XML string if file flag is set to false.
  • array $options: Optional array of options for the form creation.
  • boolean $clear: Optional argument to force load a new form.
  • string $xpath: An optional xpath to search for the fields.
loadFormData (line 203)

Method to get the data that should be injected in the form.

  • return: The default data is an empty array.
  • since: 11.1
  • access: protected
array loadFormData ()

Redefined in descendants as:
preprocessForm (line 221)

Method to allow derived classes to preprocess the form.

  • see: JFormField
  • throws: Exception if there is an error in the form event.
  • since: 11.1
  • access: protected
void preprocessForm (JForm $form, mixed $data, [string $group = 'content'])
  • JForm $form: A JForm object.
  • mixed $data: The data expected for the form.
  • string $group: The name of the plugin group to import (defaults to "content").

Redefined in descendants as:
validate (line 258)

Method to validate the form data.

  • return: Array of filtered data if valid, false otherwise.
  • see: JFormRule
  • see: JFilterInput
  • since: 11.1
  • access: public
mixed validate (JForm $form, array $data, [string $group = null])
  • JForm $form: The form to validate against.
  • array $data: The data to validate.
  • string $group: The name of the field group to validate.

Redefined in descendants as:

Inherited Methods

Inherited From JModel

JModel::__construct()
JModel::addIncludePath()
JModel::addTablePath()
JModel::cleanCache()
JModel::getDbo()
JModel::getInstance()
JModel::getName()
JModel::getState()
JModel::getTable()
JModel::populateState()
JModel::setDbo()
JModel::setState()
JModel::_createFileName()
JModel::_createTable()
JModel::_getList()
JModel::_getListCount()

Inherited From JObject

JObject::__construct()
JObject::def()
JObject::get()
JObject::getError()
JObject::getErrors()
JObject::getProperties()
JObject::set()
JObject::setError()
JObject::setProperties()
JObject::toString()
JObject::__toString()

Documentation generated on Mon, 25 Jun 2012 13:57:29 -0500 by phpDocumentor 1.4.4