Class ModulesModelModule

Description

Module model.

  • since: 1.6

Located in /administrator/components/com_modules/models/module.php (line 22)

JObject
   |
   --JModel
      |
      --JModelForm
         |
         --JModelAdmin
            |
            --ModulesModelModule
Variable Summary
string $helpKey
string $helpURL
string $text_prefix
Method Summary
boolean batch (array $commands, array $pks, array $contexts)
boolean batchCopy (integer $value, array $pks, array $contexts)
boolean batchMove (integer $value, array $pks, array $contexts)
void cleanCache ([ $group = null], [ $client_id = 0])
boolean delete (array &$pks)
boolean duplicate (array &$pks)
array generateNewTitle (integer $category_id, string $title, string $position)
void &getClient ()
JForm getForm ([array $data = array()], [boolean $loadData = true])
object An getHelp ()
mixed getItem ([integer $pk = null])
array getReorderConditions (object $table)
JTable getTable ([string $type = 'Module'], [string $prefix = 'JTable'], [array $config = array()])
mixed loadFormData ()
void populateState ()
void prepareTable (JTable &$table)
void preprocessForm (JForm $form, mixed $data, [string $group = 'content'])
boolean save (array $data)
mixed validate (object $form, array $data, [ $group = null])
Variables
string $helpKey = 'JHELP_EXTENSIONS_MODULE_MANAGER_EDIT' (line 34)
  • var: The help screen key for the module.
  • since: 1.6
  • access: protected
string $helpURL (line 40)
  • var: The help screen base URL for the module.
  • since: 1.6
  • access: protected
string $text_prefix = 'COM_MODULES' (line 28)
  • var: The prefix to use with controller messages.
  • since: 1.6
  • access: protected

Redefinition of:
JModelAdmin::$text_prefix
The prefix to use with controller messages.

Inherited Variables

Inherited from JModelAdmin

JModelAdmin::$event_after_delete
JModelAdmin::$event_after_save
JModelAdmin::$event_before_delete
JModelAdmin::$event_before_save
JModelAdmin::$event_change_state

Inherited from JModelForm

JModelForm::$_forms

Inherited from JModel

JModel::$event_clean_cache
JModel::$name
JModel::$option
JModel::$state
JModel::$_db
JModel::$__state_set

Inherited from JObject

JObject::$_errors
Methods
batch (line 81)

Method to perform batch operations on a set of modules.

  • return: Returns true on success, false on failure.
  • since: 1.7
  • access: public
boolean batch (array $commands, array $pks, array $contexts)
  • array $commands: An array of commands to perform.
  • array $pks: An array of item ids.
  • array $contexts: An array of item contexts.

Redefinition of:
JModelAdmin::batch()
Method to perform batch operations on an item or a set of items.
batchCopy (line 170)

Batch copy modules to a new position or current.

  • return: True if successful, false otherwise and internal error is set.
  • since: 11.1
  • access: protected
boolean batchCopy (integer $value, array $pks, array $contexts)
  • integer $value: The new value matching a module position.
  • array $pks: An array of row IDs.
  • array $contexts: An array of item contexts.

Redefinition of:
JModelAdmin::batchCopy()
Batch copy items to a new category or current.
batchMove (line 266)

Batch move modules to a new position or current.

  • return: True if successful, false otherwise and internal error is set.
  • since: 11.1
  • access: protected
boolean batchMove (integer $value, array $pks, array $contexts)
  • integer $value: The new value matching a module position.
  • array $pks: An array of row IDs.
  • array $contexts: An array of item contexts.

Redefinition of:
JModelAdmin::batchMove()
Batch move items to a new category
cleanCache (line 1076)

Custom clean cache method for different clients

  • since: 1.6
  • access: protected
void cleanCache ([ $group = null], [ $client_id = 0])
  • $group
  • $client_id

Redefinition of:
JModel::cleanCache()
Clean the cache
delete (line 330)

Method to delete rows.

  • return: Returns true on success, false on failure.
  • since: 1.6
  • access: public
boolean delete (array &$pks)
  • array &$pks: An array of item ids.

Redefinition of:
JModelAdmin::delete()
Method to delete one or more records.
duplicate (line 391)

Method to duplicate modules.

  • return: True if successful.
  • since: 1.6
  • throws: Exception
  • access: public
boolean duplicate (array &$pks)
  • array &$pks: An array of primary key IDs.
generateNewTitle (line 483)

Method to change the title.

  • return: Contains the modified title.
  • since: 2.5
  • access: protected
array generateNewTitle (integer $category_id, string $title, string $position)
  • integer $category_id: The id of the category. Not used here.
  • string $title: The title.
  • string $position: The position.

Redefinition of:
JModelAdmin::generateNewTitle()
Method to change the title & alias.
getClient (line 502)

Method to get the client object

  • since: 1.6
void &getClient ()
getForm (line 517)

Method to get the record form.

  • return: A JForm object on success, false on failure
  • since: 1.6
  • access: public
JForm getForm ([array $data = array()], [boolean $loadData = true])
  • array $data: Data for the form.
  • boolean $loadData: True if the form is to load its own data (default case), false if not.

Redefinition of:
JModelForm::getForm()
Abstract method for getting the form from the model.
getHelp (line 734)

Get the necessary data to load an item help screen.

  • return: object with key, url, and local properties for loading the item help screen.
  • since: 1.6
  • access: public
object An getHelp ()
getItem (line 603)

Method to get a single record.

  • return: Object on success, false on failure.
  • since: 1.6
  • access: public
mixed getItem ([integer $pk = null])
  • integer $pk: The id of the primary key.

Redefinition of:
JModelAdmin::getItem()
Method to get a single record.
getReorderConditions (line 1060)

A protected method to get a set of ordering conditions.

  • return: An array of conditions to add to add to ordering queries.
  • since: 1.6
  • access: protected
array getReorderConditions (object $table)
  • object $table: A record object.

Redefinition of:
JModelAdmin::getReorderConditions()
A protected method to get a set of ordering conditions.
getTable (line 750)

Returns a reference to the a Table object, always creating it.

  • return: A database object
  • since: 1.6
  • access: public
JTable getTable ([string $type = 'Module'], [string $prefix = 'JTable'], [array $config = array()])
  • string $type: The table type to instantiate
  • string $prefix: A prefix for the table class name. Optional.
  • array $config: Configuration array for model. Optional.

Redefinition of:
JModel::getTable()
Method to get a table object, load it if necessary.
loadFormData (line 572)

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

  • return: The data for the form.
  • since: 1.6
  • access: protected
mixed loadFormData ()

Redefinition of:
JModelForm::loadFormData()
Method to get the data that should be injected in the form.
populateState (line 51)

Method to auto-populate the model state.

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

  • since: 1.6
  • access: protected
void populateState ()

Redefinition of:
JModelAdmin::populateState()
Stock method to auto-populate the model state.
prepareTable (line 764)

Prepare and sanitise the table prior to saving.

  • since: 1.6
  • access: protected
void prepareTable (JTable &$table)
  • JTable &$table: The database object

Redefinition of:
JModelAdmin::prepareTable()
Prepare and sanitise the table data prior to saving.
preprocessForm (line 796)

Method to preprocess the form

  • since: 1.6
  • throws: Exception if there is an error loading the form.
  • access: protected
void preprocessForm (JForm $form, mixed $data, [string $group = 'content'])
  • JForm $form: A form object.
  • mixed $data: The data expected for the form.
  • string $group: The name of the plugin group to import (defaults to "content").

Redefinition of:
JModelForm::preprocessForm()
Method to allow derived classes to preprocess the form.
save (line 872)

Method to save the form data.

  • return: True on success.
  • since: 1.6
  • access: public
boolean save (array $data)
  • array $data: The form data.

Redefinition of:
JModelAdmin::save()
Method to save the form data.
validate (line 856)

Loads ContentHelper for filters before validating data.

  • return: Array of filtered data if valid, false otherwise.
  • since: 1.1
mixed validate (object $form, array $data, [ $group = null])
  • object $form: The form to validate against.
  • array $data: The data to validate.
  • $group

Redefinition of:
JModelForm::validate()
Method to validate the form data.

Inherited Methods

Inherited From JModelAdmin

JModelAdmin::__construct()
JModelAdmin::batch()
JModelAdmin::batchAccess()
JModelAdmin::batchCopy()
JModelAdmin::batchLanguage()
JModelAdmin::batchMove()
JModelAdmin::canDelete()
JModelAdmin::canEditState()
JModelAdmin::checkin()
JModelAdmin::checkout()
JModelAdmin::delete()
JModelAdmin::generateNewTitle()
JModelAdmin::getItem()
JModelAdmin::getReorderConditions()
JModelAdmin::populateState()
JModelAdmin::prepareTable()
JModelAdmin::publish()
JModelAdmin::reorder()
JModelAdmin::save()
JModelAdmin::saveorder()

Inherited From JModelForm

JModelForm::checkin()
JModelForm::checkout()
JModelForm::getForm()
JModelForm::loadForm()
JModelForm::loadFormData()
JModelForm::preprocessForm()
JModelForm::validate()

Inherited From JModel

JModel::__construct()
JModel::addIncludePath()
JModel::addTablePath()
JModel::cleanCache()
JModel::getDbo()
JModel::getInstance()
JModel::getName()
JModel::getState()
JModel::getTable()
JModel::populateState()
JModel::setDbo()
JModel::setState()
JModel::_createFileName()
JModel::_createTable()
JModel::_getList()
JModel::_getListCount()

Inherited From JObject

JObject::__construct()
JObject::def()
JObject::get()
JObject::getError()
JObject::getErrors()
JObject::getProperties()
JObject::set()
JObject::setError()
JObject::setProperties()
JObject::toString()
JObject::__toString()

Documentation generated on Mon, 25 Jun 2012 13:57:30 -0500 by phpDocumentor 1.4.4