Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe FormModel
+ Graphe d'héritage de FormModel:

Fonctions membres publiques

 __construct ($config=array(), MVCFactoryInterface $factory=null)
 
 checkin ($pk=null)
 
 checkout ($pk=null)
 
 getForm ($data=array(), $loadData=true)
 
 validate ($form, $data, $group=null)
 
- Fonctions membres publiques hérités de BaseDatabaseModel
 __construct ($config=array(), MVCFactoryInterface $factory=null)
 
 getDbo ()
 
 getName ()
 
 getState ($property=null, $default=null)
 
 getTable ($name='', $prefix='Table', $options=array())
 
 loadHistory ($versionId, \JTable &$table)
 
 setDbo ($db)
 
 setState ($property, $value=null)
 

Fonctions membres protégées

 loadForm ($name, $source=null, $options=array(), $clear=false, $xpath=false)
 
 loadFormData ()
 
 preprocessData ($context, &$data, $group='content')
 
 preprocessForm (\JForm $form, $data, $group='content')
 
- Fonctions membres protégées hérités de BaseDatabaseModel
 _getList ($query, $limitstart=0, $limit=0)
 
 _getListCount ($query)
 
 _createTable ($name, $prefix='Table', $config=array())
 
 populateState ()
 

Attributs protégés

 $_forms = array()
 
 $events_map = null
 
- Attributs protégés hérités de BaseDatabaseModel
 $__state_set = null
 
 $_db
 
 $name
 
 $option = null
 
 $state
 
 $event_clean_cache = null
 
 $factory
 

Membres hérités additionnels

- Fonctions membres publiques statiques hérités de BaseDatabaseModel
static addIncludePath ($path='', $prefix='')
 
static addTablePath ($path)
 
static getInstance ($type, $prefix='', $config=array())
 
- Fonctions membres protégées statiques hérités de BaseDatabaseModel
static _createFileName ($type, $parts=array())
 

Description détaillée

Prototype form model.

Voir également
Depuis
1.6

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $config = array(),
MVCFactoryInterface  $factory = null 
)

Constructor.

Paramètres
array$configAn optional associative array of configuration settings.
MVCFactoryInterface$factoryThe factory.
Voir également
Depuis
3.6

Références $config.

Documentation des fonctions membres

◆ checkin()

checkin (   $pk = null)

Method to checkin a row.

Paramètres
integer$pkThe numeric id of the primary key.
Renvoie
boolean False on failure or error, true otherwise.
Depuis
1.6

Références $user.

◆ checkout()

checkout (   $pk = null)

Method to check-out a row for editing.

Paramètres
integer$pkThe numeric id of the primary key.
Renvoie
boolean False on failure or error, true otherwise.
Depuis
1.6

Références $user.

◆ getForm()

getForm (   $data = array(),
  $loadData = true 
)
abstract

Abstract method for getting the form from the model.

Paramètres
array$dataData for the form.
boolean$loadDataTrue if the form is to load its own data (default case), false if not.
Renvoie
|boolean A object on success, false on failure
Depuis
1.6

◆ loadForm()

loadForm (   $name,
  $source = null,
  $options = array(),
  $clear = false,
  $xpath = false 
)
protected

Method to get a form object.

Paramètres
string$nameThe name of the form.
string$sourceThe form source. Can be XML string if file flag is set to false.
array$optionsOptional array of options for the form creation.
boolean$clearOptional argument to force load a new form.
string$xpathAn optional xpath to search for the fields.
Renvoie
|boolean object on success, false on error.
Voir également
Depuis
1.6

Références $data, $form, $hash, $name, $options, et ArrayHelper\getValue().

◆ loadFormData()

loadFormData ( )
protected

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

Renvoie
array The default data is an empty array.
Depuis
1.6

◆ preprocessData()

preprocessData (   $context,
$data,
  $group = 'content' 
)
protected

Method to allow derived classes to preprocess the data.

Paramètres
string$contextThe context identifier.
mixed&$dataThe data to be processed. It gets altered directly.
string$groupThe name of the plugin group to import (defaults to "content").
Renvoie
void
Depuis
3.1

Références $context, $data, $dispatcher, $results, et JEventDispatcher\getInstance().

◆ preprocessForm()

preprocessForm ( \JForm  $form,
  $data,
  $group = 'content' 
)
protected

Method to allow derived classes to preprocess the form.

Paramètres
\JForm$formA object.
mixed$dataThe data expected for the form.
string$groupThe name of the plugin group to import (defaults to "content").
Renvoie
void
Voir également
Depuis
1.6
Exceptions

Références $data, $dispatcher, $form, $results, et JEventDispatcher\getInstance().

◆ validate()

validate (   $form,
  $data,
  $group = null 
)

Method to validate the form data.

Paramètres
\JForm$formThe form to validate against.
array$dataThe data to validate.
string$groupThe name of the field group to validate.
Renvoie
array|boolean Array of filtered data if valid, false otherwise.
Voir également
Depuis
1.6

Références $data, $dispatcher, $form, $message, $return, et JEventDispatcher\getInstance().

Documentation des champs

◆ $_forms

$_forms = array()
protected

◆ $events_map

$events_map = null
protected

La documentation de cette classe a été générée à partir du fichier suivant :