Abstract Class JModelForm

Description

Prototype form model.

Located in /libraries/legacy/model/form.php (line 22)

JObject
   |
   --JModelLegacy
      |
      --JModelForm
Direct descendents
Class Description
 class BannersModelDownload Download model.
 class MenusModelMenu Menu Item Model for Menus.
 class MessagesModelConfig Message configuration model.
 class TemplatesModelTemplate Template model class.
 class ContactModelContact
 class UsersModelLogin Rest model class for Users.
 class UsersModelProfile Profile model class for Users.
 class UsersModelRegistration Registration model class for Users.
 class UsersModelRemind Remind model class for Users.
 class UsersModelReset Rest model class for Users.
Abstract class JModelAdmin Prototype form 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 preprocessData (string $context, mixed &$data)
 void preprocessForm (JForm $form, mixed $data, [string $group = 'content'])
 mixed validate (JForm $form, array $data, [string $group = null])
Variables
array $_forms = array() (line 30)

Array of form objects.

  • since: 12.2
  • access: protected

Inherited Variables

Inherited from JModelLegacy

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

Inherited from JObject

JObject::$_errors
Methods
checkin (line 41)

Method to checkin a row.

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

Redefined in descendants as:
checkout (line 84)

Method to check-out a row for editing.

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

Redefined in descendants as:
getForm (line 134)

Abstract method for getting the form from the model.

  • return: A JForm object on success, false on failure
  • abstract:
  • since: 12.2
  • 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 150)

Method to get a form object.

  • return: JForm object on success, False on error.
  • see: JForm
  • since: 12.2
  • 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 211)

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

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

Redefined in descendants as:
preprocessData (line 226)

Method to allow derived classes to preprocess the data.

  • since: 3.1
  • access: protected
void preprocessData (string $context, mixed &$data)
  • string $context: The context identifier.
  • mixed &$data: The data to be processed. It gets altered directly.
preprocessForm (line 255)

Method to allow derived classes to preprocess the form.

  • see: JFormField
  • throws: Exception if there is an error in the form event.
  • since: 12.2
  • 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 292)

Method to validate the form data.

  • return: Array of filtered data if valid, false otherwise.
  • see: JFormRule
  • see: JFilterInput
  • since: 12.2
  • 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 JModelLegacy

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

Inherited From JObject

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

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