ListModel
class ListModel extends BaseDatabaseModel
Model class for handling lists of items.
Methods
Add a directory where \JModelLegacy should search for models. You may either pass a string or an array of directories.
Adds to the stack of model table paths in LIFO order.
Returns a Model object, always creating it
Constructor.
Method to get model state variables
Method to get a table object, load it if necessary.
Method to load a row for editing from the version history table.
Method to set model state variables
Function to get the active filters
Method to get an array of data items.
Method to get a \JPagination object for the data set.
Method to get the total number of items for the data set.
Method to get the starting number of items for the data set.
Get the filter form
Gets the value of a user state variable and sets it in the session
Details
static
array
addIncludePath(
mixed $path = '',
string $prefix = '')
Add a directory where \JModelLegacy should search for models. You may either pass a string or an array of directories.
static
JModelLegacy|boolean
getInstance(
string $type,
string $prefix = '',
array $config = array())
Returns a Model object, always creating it
string
getName()
Method to get the model name
The model name. By default parsed using the classname or it can be set by passing a $config['name'] in the class constructor
JTable
getTable(
string $name = '',
string $prefix = 'Table',
array $options = array())
Method to get a table object, load it if necessary.
boolean
loadHistory(
integer $version_id,
JTable $table)
Method to load a row for editing from the version history table.
mixed
getUserStateFromRequest(
string $key,
string $request,
string $default = null,
string $type = 'none',
boolean $resetPage = true)
Gets the value of a user state variable and sets it in the session
This is the same as the method in \JApplication except that this also can optionally force you back to the first page when a filter has changed