AdminModel
class AdminModel extends FormModel
Prototype admin model.
Properties
string | $typeAlias | The type alias for this content type (for example, 'com_content.article'). |
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
Method override to check-in a record or an array of record
Method override to check-out a record.
Abstract method for getting the form from the model.
Method to validate the form data.
Method to perform batch operations on an item or a set of items.
Method to delete one or more records.
Method to get a single record.
Method to change the published state of one or more records.
Method to adjust the ordering of a row.
Method to save the form data.
Saves the manually set order of records.
Method to create a tags helper to ensure proper management of tags
A method to preprocess generating a new title in order to allow tables with alternative names for alias and title to use the batch move and copy methods
Method to initialize member variables used by batch methods and other methods like saveorder()
Method to load an item in com_associations.
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.
abstract
JForm|boolean
getForm(
array $data = array(),
boolean $loadData = true)
Abstract method for getting the form from the model.
array|boolean
validate(
JForm $form,
array $data,
string $group = null)
Method to validate the form data.
boolean
batch(
array $commands,
array $pks,
array $contexts)
Method to perform batch operations on an item or a set of items.
boolean
publish(
array $pks,
integer $value = 1)
Method to change the published state of one or more records.
boolean|null
reorder(
integer $pks,
integer $delta)
Method to adjust the ordering of a row.
Returns NULL if the user did not have edit privileges for any of the selected primary keys.
boolean|JException
saveorder(
array $pks = array(),
integer $order = null)
Saves the manually set order of records.
void
createTagsHelper(
JTableObserverTags $tagsObserver,
JUcmType $type,
integer $pk,
string $typeAlias,
JTable $table)
Method to create a tags helper to ensure proper management of tags
void
generateTitle(
integer $categoryId,
JTable $table)
A method to preprocess generating a new title in order to allow tables with alternative names for alias and title to use the batch move and copy methods