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é
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe ModulesModelModule
+ Graphe d'héritage de ModulesModelModule:

Fonctions membres publiques

 __construct ($config=array())
 
 delete (&$pks)
 
 duplicate (&$pks)
 
getClient ()
 
 getForm ($data=array(), $loadData=true)
 
 getItem ($pk=null)
 
 getHelp ()
 
 getTable ($type='Module', $prefix='JTable', $config=array())
 
 validate ($form, $data, $group=null)
 
 save ($data)
 

Champs de données

 $typeAlias = 'com_modules.module'
 

Fonctions membres protégées

 populateState ()
 
 batchCopy ($value, $pks, $contexts)
 
 batchMove ($value, $pks, $contexts)
 
 canEditState ($record)
 
 generateNewTitle ($categoryId, $title, $position)
 
 loadFormData ()
 
 prepareTable ($table)
 
 preprocessForm (JForm $form, $data, $group='content')
 
 getReorderConditions ($table)
 
 cleanCache ($group=null, $clientId=0)
 

Attributs protégés

 $text_prefix = 'COM_MODULES'
 
 $helpKey = 'JHELP_EXTENSIONS_MODULE_MANAGER_EDIT'
 
 $helpURL
 
 $batch_copymove = 'position_id'
 
 $batch_commands
 

Description détaillée

Module model.

Depuis
1.6

Documentation des constructeurs et destructeur

◆ __construct()

__construct (   $config = array())

Constructor.

Paramètres
array$configAn optional associative array of configuration settings.

Références $config.

Documentation des fonctions membres

◆ batchCopy()

batchCopy (   $value,
  $pks,
  $contexts 
)
protected

Batch copy modules to a new position or current.

Paramètres
integer$valueThe new value matching a module position.
array$pksAn array of row IDs.
array$contextsAn array of item contexts.
Renvoie
boolean True if successful, false otherwise and internal error is set.
Depuis
2.5

Références $data, $db, $menu, $position, $query, $user, $value, et elseif.

◆ batchMove()

batchMove (   $value,
  $pks,
  $contexts 
)
protected

Batch move modules to a new position or current.

Paramètres
integer$valueThe new value matching a module position.
array$pksAn array of row IDs.
array$contextsAn array of item contexts.
Renvoie
boolean True if successful, false otherwise and internal error is set.
Depuis
2.5

Références $position, $user, $value, et elseif.

◆ canEditState()

canEditState (   $record)
protected

Method to test whether a record can have its state edited.

Paramètres
object$recordA record object.
Renvoie
boolean True if allowed to change the state of the record. Defaults to the permission set in the component.
Depuis
3.2

◆ cleanCache()

cleanCache (   $group = null,
  $clientId = 0 
)
protected

Custom clean cache method for different clients

Paramètres
string$groupThe name of the plugin group to import (defaults to null).
integer$clientIdThe client ID. [optional]
Renvoie
void
Depuis
1.6

◆ delete()

delete ( $pks)

Method to delete rows.

Paramètres
array&$pksAn array of item ids.
Renvoie
boolean Returns true on success, false on failure.
Depuis
1.6
Exceptions
Exception

Références $context, $db, $dispatcher, $name, $query, $user, JEventDispatcher\getInstance(), option, et JError\raiseWarning().

◆ duplicate()

duplicate ( $pks)

Method to duplicate modules.

Paramètres
array&$pksAn array of primary key IDs.
Renvoie
boolean|JException Boolean true on success, JException instance on error
Depuis
1.6
Exceptions
Exception

Références $data, $db, $query, $rows, $user, null, et JError\raiseWarning().

◆ generateNewTitle()

generateNewTitle (   $categoryId,
  $title,
  $position 
)
protected

Method to change the title.

Paramètres
integer$categoryIdThe id of the category. Not used here.
string$titleThe title.
string$positionThe position.
Renvoie
array Contains the modified title.
Depuis
2.5

Références $position, et $title.

◆ getClient()

& getClient ( )

Method to get the client object

Renvoie
void
Depuis
1.6

◆ getForm()

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

Method to get the record form.

Paramètres
array$dataData for the form.
boolean$loadDataTrue if the form is to load its own data (default case), false if not.
Renvoie
JForm A JForm object on success, false on failure
Depuis
1.6

Check for existing module Modify the form based on Edit State access controls.

Références $clientId, $data, $form, $id, $item, $module, $user, ArrayHelper\getValue(), JPATH_ADMINISTRATOR, et JPATH_SITE.

◆ getHelp()

getHelp ( )

Get the necessary data to load an item help screen.

Renvoie
object An object with key, url, and local properties for loading the item help screen.
Depuis
1.6

◆ getItem()

getItem (   $pk = null)

Method to get a single record.

Paramètres
integer$pkThe id of the primary key.
Renvoie
mixed Object on success, false on failure.
Depuis
1.6

Références $client, $db, $extension, $path, $query, $return, elseif, null, et ArrayHelper\toObject().

◆ getReorderConditions()

getReorderConditions (   $table)
protected

A protected method to get a set of ordering conditions.

Paramètres
object$tableA record object.
Renvoie
array An array of conditions to add to add to ordering queries.
Depuis
1.6

Références $condition.

◆ getTable()

getTable (   $type = 'Module',
  $prefix = 'JTable',
  $config = array() 
)

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

Paramètres
string$typeThe table type to instantiate
string$prefixA prefix for the table class name. Optional.
array$configConfiguration array for model. Optional.
Renvoie
JTable A database object
Depuis
1.6

Références $config, $prefix, et $type.

◆ loadFormData()

loadFormData ( )
protected

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

Renvoie
mixed The data for the form.
Depuis
1.6

Références $app, $data, $filters, $params, et null.

◆ populateState()

populateState ( )
protected

Method to auto-populate the model state.

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

Renvoie
void
Depuis
1.6

Références $app, et $params.

◆ prepareTable()

prepareTable (   $table)
protected

Prepare and sanitise the table prior to saving.

Paramètres
JTable$tableThe database object
Renvoie
void
Depuis
1.6

Références ENT_QUOTES.

◆ preprocessForm()

preprocessForm ( JForm  $form,
  $data,
  $group = 'content' 
)
protected

Method to preprocess the form

Paramètres
JForm$formA form object.
mixed$dataThe data expected for the form.
string$groupThe name of the plugin group to import (defaults to "content").
Renvoie
void
Depuis
1.6
Exceptions
Exceptionif there is an error loading the form.

Références $client, $clientId, $data, $form, $lang, $module, jimport(), JPATH_ADMINISTRATOR, et null.

◆ save()

save (   $data)

Method to save the form data.

Paramètres
array$dataThe form data.
Renvoie
boolean True on success.
Depuis
1.6

Références $context, $data, $db, $dispatcher, $input, $name, $query, elseif, JEventDispatcher\getInstance(), option, et JError\raiseWarning().

◆ validate()

validate (   $form,
  $data,
  $group = null 
)

Loads ContentHelper for filters before validating data.

Paramètres
object$formThe form to validate against.
array$dataThe data to validate.
string$groupThe name of the group(defaults to null).
Renvoie
mixed Array of filtered data if valid, false otherwise.
Depuis
1.1

Références $data, $form, JPATH_ADMINISTRATOR, JLoader\register(), et validate().

Documentation des champs

◆ $batch_commands

$batch_commands
protected
Valeur initiale :
= array(
'assetgroup_id' => 'batchAccess',
'language_id' => 'batchLanguage',
)

◆ $batch_copymove

$batch_copymove = 'position_id'
protected

◆ $helpKey

$helpKey = 'JHELP_EXTENSIONS_MODULE_MANAGER_EDIT'
protected

◆ $helpURL

$helpURL
protected

◆ $text_prefix

$text_prefix = 'COM_MODULES'
protected

◆ $typeAlias

$typeAlias = 'com_modules.module'

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