Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe ModuleModel
+ Graphe d'héritage de ModuleModel:

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)
 
- Fonctions membres publiques hérités de AdminModel
 __construct ($config=array(), MVCFactoryInterface $factory=null, FormFactoryInterface $formFactory=null)
 
 batch ($commands, $pks, $contexts)
 
 checkin ($pks=array())
 
 checkout ($pk=null)
 
 delete (&$pks)
 
 getItem ($pk=null)
 
 publish (&$pks, $value=1)
 
 reorder ($pks, $delta=0)
 
 save ($data)
 
 saveorder ($pks=array(), $order=null)
 
 generateTitle ($categoryId, $table)
 
 initBatch ()
 
 editAssociations ($data)
 
- Fonctions membres publiques hérités de FormModel
 __construct ($config=array(), MVCFactoryInterface $factory=null, FormFactoryInterface $formFactory=null)
 
 checkin ($pk=null)
 
 checkout ($pk=null)
 
 validate ($form, $data, $group=null)
 
- Fonctions membres publiques hérités de BaseDatabaseModel
 __construct ($config=array(), MVCFactoryInterface $factory=null)
 
 getTable ($name='', $prefix='', $options=array())
 
 isCheckedOut ($item)
 
 getDbo ()
 
 setDbo (DatabaseInterface $db=null)
 
 __get ($name)
 
- Fonctions membres publiques hérités de BaseModel
 __construct ($config=array())
 
 getName ()
 
- Fonctions membres publiques hérités de CMSObject
 __construct ($properties=null)
 
 __toString ()
 
 def ($property, $default=null)
 
 get ($property, $default=null)
 
 getProperties ($public=true)
 
 getError ($i=null, $toString=true)
 
 getErrors ()
 
 set ($property, $value=null)
 
 setProperties ($properties)
 
 setError ($error)
 
- Fonctions membres publiques hérités de StatefulModelInterface
 getState ($property=null, $default=null)
 
 setState ($property, $value=null)
 
- Fonctions membres publiques hérités de DispatcherAwareInterface
 setDispatcher (DispatcherInterface $dispatcher)
 
- Fonctions membres publiques hérités de CurrentUserInterface
 setCurrentUser (User $currentUser)
 
- Fonctions membres publiques hérités de CacheControllerFactoryAwareInterface
 setCacheControllerFactory (CacheControllerFactoryInterface $factory)
 
- Fonctions membres publiques hérités de DatabaseAwareInterface
 setDatabase (DatabaseInterface $db)
 
- Fonctions membres publiques hérités de FormFactoryAwareInterface
 setFormFactory (FormFactoryInterface $factory)
 

Champs de données

 $typeAlias = 'com_modules.module'
 
- Champs de données hérités de AdminModel
 $typeAlias
 

Fonctions membres protégées

 populateState ()
 
 batchCopy ($value, $pks, $contexts)
 
 batchMove ($value, $pks, $contexts)
 
 canEditState ($record)
 
 generateNewTitle ($categoryId, $title, $position)
 
 loadFormData ()
 
 prepareTable ($table)
 
 preprocessForm (Form $form, $data, $group='content')
 
 getReorderConditions ($table)
 
 cleanCache ($group=null, $clientId=0)
 
- Fonctions membres protégées hérités de AdminModel
 batchAccess ($value, $pks, $contexts)
 
 batchCopy ($value, $pks, $contexts)
 
 cleanupPostBatchCopy (TableInterface $table, $newId, $oldId)
 
 batchLanguage ($value, $pks, $contexts)
 
 batchMove ($value, $pks, $contexts)
 
 batchTag ($value, $pks, $contexts)
 
 canDelete ($record)
 
 canEditState ($record)
 
 generateNewTitle ($categoryId, $alias, $title)
 
 getReorderConditions ($table)
 
 populateState ()
 
 prepareTable ($table)
 
 checkCategoryId ($categoryId)
 
 redirectToAssociations ($data)
 
- Fonctions membres protégées hérités de BaseDatabaseModel
 _getList ($query, $limitstart=0, $limit=0)
 
 _getListCount ($query)
 
 _createTable ($name, $prefix='Table', $config=array())
 
 bootComponent ($component)
 
 dispatchEvent (EventInterface $event)
 

Attributs protégés

 $text_prefix = 'COM_MODULES'
 
 $helpKey = ''
 
 $helpURL
 
 $batch_copymove = 'position_id'
 
 $batch_commands
 
- Attributs protégés hérités de AdminModel
 $text_prefix = null
 
 $event_after_delete = null
 
 $event_after_save = null
 
 $event_before_delete = null
 
 $event_before_save = null
 
 $event_before_change_state = null
 
 $event_change_state = null
 
 $event_before_batch = null
 
 $batch_copymove = 'category_id'
 
 $batch_commands
 
 $associationsContext = null
 
 $batchSet = null
 
 $user = null
 
 $table = null
 
 $tableClassName = null
 
 $contentType = null
 
 $type = null
 
- Attributs protégés hérités de FormModel
 $events_map = null
 
- Attributs protégés hérités de BaseDatabaseModel
 $option = null
 
 $event_clean_cache = null
 
- Attributs protégés hérités de BaseModel
 $name
 
- Attributs protégés hérités de CMSObject
 $_errors = array()
 

Membres hérités additionnels

- Fonctions membres publiques statiques hérités de BaseModel
static addIncludePath ($path='', $prefix='')
 
- Attributs protégés statiques hérités de BaseModel
static $paths
 

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, et Symfony\Contracts\Service\__construct().

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, $i, $menu, $position, $query, $user, $value, Text\_(), elseif, Joomla\Database\getDatabase(), Factory\getUser(), et ParameterType\INTEGER.

◆ 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, Text\_(), elseif, et Factory\getUser().

◆ 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

Références Factory\getUser().

◆ 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$clientId

◆ 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

Références $app, $context, $db, $name, $query, $result, $user, Text\_(), Factory\getApplication(), Joomla\Database\getDatabase(), Factory\getUser(), PluginHelper\importPlugin(), et ParameterType\INTEGER.

◆ duplicate()

duplicate ( $pks)

Method to duplicate modules.

Paramètres
array&$pksAn array of primary key IDs.
Renvoie
boolean Boolean true on success
Depuis
1.6
Exceptions

Références $data, $db, $query, $rows, $user, Text\_(), Factory\getApplication(), Joomla\Database\getDatabase(), Factory\getUser(), ParameterType\INTEGER, et null.

◆ 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, $title, et StringHelper\increment().

◆ 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
Form|bool A Form object on success, false on failure
Depuis
1.6

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

Implémente FormModelInterface.

Références $clientId, $data, $form, $id, $item, $module, $user, Form\addFieldPath(), Factory\getUser(), ArrayHelper\getValue(), ModuleHelper\isAdminMultilang(), JPATH_ADMINISTRATOR, JPATH_SITE, Joomla\CMS\MVC\Model\loadForm(), et Joomla\CMS\MVC\Model\setState().

◆ 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, Route\_(), class, Path\clean(), elseif, Factory\getApplication(), ApplicationHelper\getClientInfo(), Joomla\Database\getDatabase(), Joomla\CMS\MVC\Model\getState(), ParameterType\INTEGER, 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 ordering queries.
Depuis
1.6

Références $db, et Joomla\Database\getDatabase().

◆ 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
Table A database object
Depuis
1.6

Références $config, $prefix, $type, et Table\getInstance().

◆ 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, $clientId, $data, $filters, $params, Factory\getApplication(), null, et Joomla\CMS\MVC\Model\preprocessData().

◆ 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, $params, Factory\getApplication(), ComponentHelper\getParams(), et Joomla\CMS\MVC\Model\setState().

◆ prepareTable()

prepareTable (   $table)
protected

Prepare and sanitise the table prior to saving.

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

Références ENT_QUOTES.

◆ preprocessForm()

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

Method to preprocess the form

Paramètres
Form$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

Références $client, $clientId, $data, $form, $helpURL, $lang, $module, $template, $xml, Text\_(), Form\addFormPath(), Path\clean(), Folder\files(), ApplicationHelper\getClientInfo(), Factory\getLanguage(), Joomla\CMS\MVC\Model\getState(), ModulesHelper\getTemplates(), JPATH_ADMINISTRATOR, JPATH_SITE, et Joomla\CMS\MVC\Model\preprocessForm().

◆ 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, $input, $name, $query, $result, $this, elseif, Factory\getApplication(), Joomla\CMS\MVC\Model\getState(), PluginHelper\importPlugin(), StringHelper\increment(), ParameterType\INTEGER, et Joomla\CMS\MVC\Model\setState().

◆ 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, et Factory\getUser().

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 = ''
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 :