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

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 ()
 
 getExtensionElementsForMenuItems (array $itemIds)
 
- 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)
 

Fonctions membres protégées

 canDelete ($record)
 
 canEditState ($record)
 
 populateState ()
 
 loadFormData ()
 
 cleanCache ($group=null, $clientId=0)
 
- 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_MENUS_MENU'
 
 $_context = 'com_menus.menu'
 
- 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

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

Références Factory\getUser().

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

◆ cleanCache()

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

Custom clean the cache

Paramètres
string$groupCache group name.
integer$clientId

◆ 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 $itemId, $itemIds, $result, Factory\getApplication(), PluginHelper\importPlugin(), et ArrayHelper\toInteger().

◆ getExtensionElementsForMenuItems()

getExtensionElementsForMenuItems ( array  $itemIds)

Returns the extension elements for the given items

Paramètres
array$itemIdsThe item ids
Renvoie
array
Depuis
4.2.0

Références $db, $itemIds, $query, Joomla\Database\getDatabase(), 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
Form|boolean A Form object on success, false on failure
Depuis
1.6

Implémente FormModelInterface.

Références $form, Joomla\CMS\MVC\Model\getState(), et Joomla\CMS\MVC\Model\loadForm().

◆ 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, class, Joomla\CMS\MVC\Model\getState(), 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, $query, $result, et Joomla\Database\getDatabase().

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

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

◆ 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, $id, $result, Factory\getApplication(), Joomla\CMS\MVC\Model\getState(), PluginHelper\importPlugin(), et Joomla\CMS\MVC\Model\setState().

◆ validate()

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

Method to validate the form data.

Paramètres
Form$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 Factory\getUser().

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 :