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 MenusModelMenu
+ Graphe d'héritage de MenusModelMenu:

Fonctions membres publiques

 getTable ($type='MenuType', $prefix='JTable', $config=array())
 
getItem ($itemId=null)
 
 getForm ($data=array(), $loadData=true)
 
 validate ($form, $data, $group=null)
 
 save ($data)
 
 delete ($itemIds)
 
getModules ()
 

Fonctions membres protégées

 canDelete ($record)
 
 canEditState ($record)
 
 populateState ()
 
 loadFormData ()
 
 cleanCache ($group=null, $clientId=0)
 

Attributs protégés

 $text_prefix = 'COM_MENUS_MENU'
 
 $_context = 'com_menus.menu'
 

Description détaillée

Menu Item Model for Menus.

Depuis
1.6

Documentation des fonctions membres

◆ canDelete()

canDelete (   $record)
protected

Method to test whether a record can be deleted.

Paramètres
object$recordA record object.
Renvoie
boolean True if allowed to delete the record. Defaults to the permission set in the component.
Depuis
1.6

◆ canEditState()

canEditState (   $record)
protected

Method to test whether the state of a record can be 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
1.6

Références $user.

◆ cleanCache()

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

Custom clean the cache

Paramètres
string$groupCache group name.
integer$clientIdApplication client id.
Renvoie
void
Depuis
1.6

◆ delete()

delete (   $itemIds)

Method to delete groups.

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

Références $dispatcher, $itemId, JEventDispatcher\getInstance(), et ArrayHelper\toInteger().

◆ getForm()

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

Method to get the menu item 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

Références $form.

◆ getItem()

& getItem (   $itemId = null)

Method to get a menu item.

Paramètres
integer$itemIdThe id of the menu item to get.
Renvoie
mixed Menu item data object on success, false on failure.
Depuis
1.6

Références $itemId, $return, $value, et ArrayHelper\toObject().

◆ getModules()

& getModules ( )

Gets a list of all mod_mainmenu modules and collates them by menutype

Renvoie
array
Depuis
1.6

Références $db, $menuType, $module, $modules, $params, et $query.

◆ getTable()

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

Returns 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 $data.

◆ populateState()

populateState ( )
protected

Auto-populate the model state.

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

Renvoie
void
Depuis
1.6

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

◆ 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 $data, $dispatcher, $id, et JEventDispatcher\getInstance().

◆ validate()

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

Method to validate the form data.

Paramètres
JForm$formThe form to validate against.
array$dataThe data to validate.
string$groupThe name of the field group to validate.
Renvoie
array|boolean Array of filtered data if valid, false otherwise.
Voir également
JFormRule
JFilterInput
Depuis
3.9.23

Références $data, $form, et validate().

Documentation des champs

◆ $_context

$_context = 'com_menus.menu'
protected

◆ $text_prefix

$text_prefix = 'COM_MENUS_MENU'
protected

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