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é
Référence de la classe ListModel
+ Graphe d'héritage de ListModel:

Fonctions membres publiques

 __construct ($config=array(), MVCFactoryInterface $factory=null)
 
 getActiveFilters ()
 
 getItems ()
 
 getPagination ()
 
 getTotal ()
 
 getStart ()
 
 getFilterForm ($data=array(), $loadData=true)
 
 getUserStateFromRequest ($key, $request, $default=null, $type='none', $resetPage=true)
 
- 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

 _getListQuery ()
 
 getListQuery ()
 
 getStoreId ($id='')
 
 loadForm ($name, $source=null, $options=array(), $clear=false, $xpath=false)
 
 loadFormData ()
 
 populateState ($ordering=null, $direction=null)
 
 preprocessForm (\JForm $form, $data, $group='content')
 
 refineSearchStringToRegex ($search, $regexDelimiter='/')
 
- 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

 $cache = array()
 
 $context = null
 
 $filter_fields = array()
 
 $query = array()
 
 $lastQueryStoreId = null
 
 $filterFormName = null
 
 $htmlFormName = 'adminForm'
 
 $filterBlacklist = array()
 
 $listBlacklist = array('select')
 
- 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

Model class for handling lists of items.

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
1.6

Références $config, et option.

Documentation des fonctions membres

◆ _getListQuery()

_getListQuery ( )
protected

Method to cache the last query constructed.

This method ensures that the query is constructed only once for a given state of the model.

Renvoie
A object
Depuis
1.6

Références $query.

◆ getActiveFilters()

getActiveFilters ( )

Function to get the active filters

Renvoie
array Associative array in the format: array('filter_published' => 0)
Depuis
3.2

Références $filter.

◆ getFilterForm()

getFilterForm (   $data = array(),
  $loadData = true 
)

Get the filter form

Paramètres
array$datadata
boolean$loadDataload current data
Renvoie
|boolean The object or false on error
Depuis
3.2

Références $form, et null.

◆ getItems()

getItems ( )

Method to get an array of data items.

Renvoie
mixed An array of data items on success, false on failure.
Depuis
1.6

◆ getListQuery()

getListQuery ( )
protected

Method to get a object for retrieving the data set from a database.

Renvoie
A object to retrieve the data set.
Depuis
1.6

◆ getPagination()

getPagination ( )

Method to get a object for the data set.

Renvoie
A object for the data set.
Depuis
1.6

Références $limit.

◆ getStart()

getStart ( )

Method to get the starting number of items for the data set.

Renvoie
integer The starting number of items available in the data set.
Depuis
1.6

Références $limit, $start, et $total.

◆ getStoreId()

getStoreId (   $id = '')
protected

Method to get a store id based on the model configuration state.

This is necessary because the model is used by the component and different modules that might need different sets of data or different ordering requirements.

Paramètres
string$idAn identifier string to generate the store id.
Renvoie
string A store id.
Depuis
1.6

Références $id.

◆ getTotal()

getTotal ( )

Method to get the total number of items for the data set.

Renvoie
integer The total number of items available in the data set.
Depuis
1.6

◆ getUserStateFromRequest()

getUserStateFromRequest (   $key,
  $request,
  $default = null,
  $type = 'none',
  $resetPage = true 
)

Gets the value of a user state variable and sets it in the session

This is the same as the method in except that this also can optionally force you back to the first page when a filter has changed

Paramètres
string$keyThe key of the user state variable.
string$requestThe name of the variable passed in a request.
string$defaultThe default value for the variable if not found. Optional.
string$typeFilter for the variable, for valid values see JFilterInput::clean().Optional.@paramboolean$resetPageIftrue,thelimitstartinrequestissettozero@returnmixedTherequestuserstate.@since1.6

Références $app, $default, $filters, $input, $key, $name, $type, et null.

◆ 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 | boolean$xpathAn optional xpath to search for the fields.
Renvoie
|boolean object on success, False on error.
Voir également
Depuis
3.2

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
mixed The data for the form.
Depuis
3.2

Références $data.

◆ populateState()

populateState (   $ordering = null,
  $direction = null 
)
protected

Method to auto-populate the model state.

This method should only be called once per instantiation and is designed to be called on the first call to the getState() method unless the model configuration flag to ignore the request is set.

Note. Calling getState in this method will result in recursion.

Paramètres
string$orderingAn optional ordering field.
string$directionAn optional direction (asc|desc).
Renvoie
void
Depuis
1.6

Références $app, $direction, $field, $filters, $limit, $list, $name, $ordering, et $value.

◆ 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
Depuis
3.2
Exceptions

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

◆ refineSearchStringToRegex()

refineSearchStringToRegex (   $search,
  $regexDelimiter = '/' 
)
protected

Parse and transform the search string into a string fit for regex-ing arbitrary strings against

Paramètres
string$searchThe search string
string$regexDelimiterThe regex delimiter to use for the quoting
Renvoie
string Search string escaped for regex
Depuis
3.4

Références $key.

Documentation des champs

◆ $cache

$cache = array()
protected

◆ $context

$context = null
protected

◆ $filter_fields

$filter_fields = array()
protected

◆ $filterBlacklist

$filterBlacklist = array()
protected

◆ $filterFormName

$filterFormName = null
protected

◆ $htmlFormName

$htmlFormName = 'adminForm'
protected

◆ $lastQueryStoreId

$lastQueryStoreId = null
protected

◆ $listBlacklist

$listBlacklist = array('select')
protected

◆ $query

$query = array()
protected

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