Back to Joomla project (class list)

Class AdminModel - list of methods

Prototype admin model.

Extends

Package: Joomla\CMS\MVC\Model
Copyright: (C) 2010 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/MVC/Model/AdminModel.php
Project: Joomla

Method Summary

public
(mixed $config = array(), \Joomla\CMS\MVC\Factory\MVCFactoryInterface $factory = null, \Joomla\CMS\Form\FormFactoryInterface $formFactory = null)

Constructor.
Parameters
  • array $config An array of configuration options (name, state, dbo, table_path, ignore_request).
  • \Joomla\CMS\MVC\Factory\MVCFactoryInterface $factory The factory.
  • \Joomla\CMS\Form\FormFactoryInterface $formFactory The form factory.
Since
  • 1.6
-
  • \Exception
Show source code of this method: __construct Source Code

public bool
(mixed $commands, mixed $pks, mixed $contexts)

Method to perform batch operations on an item or a set of items.
Parameters
  • array $commands An array of commands to perform.
  • array $pks An array of item ids.
  • array $contexts An array of item contexts.
Returns
  • bool Returns true on success, false on failure.
Since
  • 1.7
Show source code of this method: batch Source Code

protected bool
(mixed $value, mixed $pks, mixed $contexts)

Batch access level changes for a group of rows.
Parameters
  • int $value The new value matching an Asset Group ID.
  • array $pks An array of row IDs.
  • array $contexts An array of item contexts.
Returns
  • bool True if successful, false otherwise and internal error is set.
Since
  • 1.7
Show source code of this method: batchAccess Source Code

protected array|bool
(mixed $value, mixed $pks, mixed $contexts)

Batch copy items to a new category or current.
Parameters
  • int $value The new category.
  • array $pks An array of row IDs.
  • array $contexts An array of item contexts.
Returns
  • array|bool An array of new IDs on success, boolean false on failure.
Since
  • 1.7
Show source code of this method: batchCopy Source Code

protected void
(\Joomla\CMS\Table\TableInterface $table, mixed $newId, mixed $oldId)

Function that can be overridden to do any data cleanup after batch copying data
Parameters
  • \Joomla\CMS\Table\TableInterface $table The table object containing the newly created item
  • int $newId The id of the new item
  • int $oldId The original item id
Returns
  • void
Since
  • 3.8.12
Show source code of this method: cleanupPostBatchCopy Source Code

protected bool
(mixed $value, mixed $pks, mixed $contexts)

Batch language changes for a group of rows.
Parameters
  • string $value The new value matching a language.
  • array $pks An array of row IDs.
  • array $contexts An array of item contexts.
Returns
  • bool True if successful, false otherwise and internal error is set.
Since
  • 2.5
Show source code of this method: batchLanguage Source Code

protected bool
(mixed $value, mixed $pks, mixed $contexts)

Batch move items to a new category
Parameters
  • int $value The new category ID.
  • array $pks An array of row IDs.
  • array $contexts An array of item contexts.
Returns
  • bool True if successful, false otherwise and internal error is set.
Since
  • 1.7
Show source code of this method: batchMove Source Code

protected bool
(mixed $value, mixed $pks, mixed $contexts)

Batch tag a list of item.
Parameters
  • int $value The value of the new tag.
  • array $pks An array of row IDs.
  • array $contexts An array of item contexts.
Returns
  • bool True if successful, false otherwise and internal error is set.
Since
  • 3.1
Show source code of this method: batchTag Source Code

protected bool
(mixed $record)

Method to test whether a record can be deleted.
Parameters
  • object $record A record object.
Returns
  • bool True if allowed to delete the record. Defaults to the permission for the component.
Since
  • 1.6
Show source code of this method: canDelete Source Code

protected bool
(mixed $record)

Method to test whether a record can have its state changed.
Parameters
  • object $record A record object.
Returns
  • bool True if allowed to change the state of the record. Defaults to the permission for the component.
Since
  • 1.6
Show source code of this method: canEditState Source Code

public int|bool
(mixed $pks = array())

Method override to check-in a record or an array of record
Parameters
  • mixed $pks The ID of the primary key or an array of IDs
Returns
  • int|bool Boolean false if there is an error, otherwise the count of records checked in.
Since
  • 1.6
Show source code of this method: checkin Source Code

public bool
(mixed $pk = null)

Method override to check-out a record.
Parameters
  • int $pk The ID of the primary key.
Returns
  • bool True if successful, false if an error occurs.
Since
  • 1.6
Show source code of this method: checkout Source Code

public bool
(mixed &$pks)

Method to delete one or more records.
Parameters
  • array & $pks An array of record primary keys.
Returns
  • bool True if successful, false if an error occurs.
Since
  • 1.6
Show source code of this method: delete Source Code

protected array
(mixed $categoryId, mixed $alias, mixed $title)

Method to change the title & alias.
Parameters
  • int $categoryId The id of the category.
  • string $alias The alias.
  • string $title The title.
Returns
  • array Contains the modified title and alias.
Since
  • 1.7
Show source code of this method: generateNewTitle Source Code

public \Joomla\CMS\Object\CMSObject|bool
(mixed $pk = null)

Method to get a single record.
Parameters
  • int $pk The id of the primary key.
Returns
  • \Joomla\CMS\Object\CMSObject|bool Object on success, false on failure.
Since
  • 1.6
Show source code of this method: getItem Source Code

protected array
(mixed $table)

A protected method to get a set of ordering conditions.
Parameters
  • \Joomla\CMS\Table\Table $table A Table object.
Returns
  • array An array of conditions to add to ordering queries.
Since
  • 1.6
Show source code of this method: getReorderConditions Source Code

protected void
()

Stock method to auto-populate the model state.
Returns
  • void
Since
  • 1.6
Show source code of this method: populateState Source Code

protected void
(mixed $table)

Prepare and sanitise the table data prior to saving.
Parameters
  • \Joomla\CMS\Table\Table $table A reference to a Table object.
Returns
  • void
Since
  • 1.6
Show source code of this method: prepareTable Source Code

public bool
(mixed &$pks, mixed $value = 1)

Method to change the published state of one or more records.
Parameters
  • array & $pks A list of the primary keys to change.
  • int $value The value of the published state.
Returns
  • bool True on success.
Since
  • 1.6
Show source code of this method: publish Source Code

public bool|null
(mixed $pks, mixed $delta = 0)

Method to adjust the ordering of a row.
Parameters
  • int $pks The ID of the primary key to move.
  • int $delta Increment, usually +1 or -1
Returns
  • bool|null False on failure or error, true on success, null if the $pk is empty (no items selected).
Since
  • 1.6
Show source code of this method: reorder Source Code

public bool
(mixed $data)

Method to save the form data.
Parameters
  • array $data The form data.
Returns
  • bool True on success, False on error.
Since
  • 1.6
Show source code of this method: save Source Code

public bool
(mixed $pks = array(), mixed $order = null)

Saves the manually set order of records.
Parameters
  • array $pks An array of primary key ids.
  • int $order +1 or -1
Returns
  • bool Boolean true on success, false on failure
Since
  • 1.6
Show source code of this method: saveorder Source Code

protected bool
(mixed $categoryId)

Method to check the validity of the category ID for batch copy and move
Parameters
  • int $categoryId The category ID to check
Returns
  • bool
Since
  • 3.2
Show source code of this method: checkCategoryId Source Code

public void
(mixed $categoryId, mixed $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
Parameters
  • int $categoryId The target category id
  • \Joomla\CMS\Table\Table $table The Table within which move or copy is taking place
Returns
  • void
Since
  • 3.2
Show source code of this method: generateTitle Source Code

public void
()

Method to initialize member variables used by batch methods and other methods like saveorder()
Returns
  • void
Since
  • 3.8.2
Show source code of this method: initBatch Source Code

public bool
(mixed $data)

Method to load an item in com_associations.
Parameters
  • array $data The form data.
Returns
  • bool True if successful, false otherwise.
Since
  • 3.9.0
Deprecated
  • 5.0
Show source code of this method: editAssociations Source Code

protected bool
(mixed $data)

Method to load an item in com_associations.
Parameters
  • array $data The form data.
Returns
  • bool True if successful, false otherwise.
Since
  • 3.9.17
-
  • \Exception
Show source code of this method: redirectToAssociations Source Code

Properties Summary

public string
$typeAlias
The type alias for this content type (for example, 'com_content.article').
Since
  • 3.8.6
protected string
$text_prefix
The prefix to use with controller messages.
Since
  • 1.6
protected string
$event_after_delete
The event to trigger after deleting the data.
Since
  • 1.6
protected string
$event_after_save
The event to trigger after saving the data.
Since
  • 1.6
protected string
$event_before_delete
The event to trigger before deleting the data.
Since
  • 1.6
protected string
$event_before_save
The event to trigger before saving the data.
Since
  • 1.6
protected string
$event_before_change_state
The event to trigger before changing the published state of the data.
Since
  • 4.0.0
protected string
$event_change_state
The event to trigger after changing the published state of the data.
Since
  • 1.6
protected string
$event_before_batch
The event to trigger before batch.
Since
  • 4.0.0
protected string
$batch_copymove
Batch copy/move command. If set to false, the batch copy/move command is not supported
Since
  • 3.4
protected array
$batch_commands
Allowed batch commands
Since
  • 3.4
protected string
$associationsContext
The context used for the associations table
Since
  • 3.4.4
protected object
$batchSet
A flag to indicate if member variables for batch actions (and saveorder) have been initialized
Since
  • 3.8.2
protected object
$user
The user performing the actions (re-usable in batch methods & saveorder(), initialized via initBatch())
Since
  • 3.8.2
protected \Joomla\CMS\Table\Table
$table
A JTable instance (of appropriate type) to manage the DB records (re-usable in batch methods & saveorder(), initialized via initBatch())
Since
  • 3.8.2
protected string
$tableClassName
The class name of the JTable instance managing the DB records (re-usable in batch methods & saveorder(), initialized via initBatch())
Since
  • 3.8.2
protected object
$contentType
UCM Type corresponding to the current model class (re-usable in batch action methods, initialized via initBatch())
Since
  • 3.8.2
protected object
$type
DB data of UCM Type corresponding to the current model class (re-usable in batch action methods, initialized via initBatch())
Since
  • 3.8.2

Tags Summary

Since
1.6