Class MenusModelMenu

Description

Menu Item Model for Menus.

  • since: 1.6

Located in /administrator/components/com_menus/models/menu.php (line 19)

JObject
   |
   --JModelLegacy
      |
      --JModelForm
         |
         --MenusModelMenu
Variable Summary
 string $text_prefix
 string $_context
Method Summary
 boolean canDelete (object A $record)
 boolean canEditState (object A $record)
 void cleanCache ([ $group = null], [ $client_id = 0])
 boolean delete (array $itemIds)
 JForm getForm ([array $data = array()], [boolean $loadData = true])
 mixed &getItem ([integer $itemId = null])
 array &getModules ()
 JTable getTable ([type $type = 'MenuType'], [string $prefix = 'JTable'], [array $config = array()])
 mixed loadFormData ()
 void populateState ()
 boolean save (array $data)
Variables
string $text_prefix = 'COM_MENUS_MENU' (line 25)
  • var: The prefix to use with controller messages.
  • since: 1.6
  • access: protected
string $_context = 'com_menus.menu' (line 32)

Model context string.

  • access: protected

Inherited Variables

Inherited from JModelForm

JModelForm::$_forms

Inherited from JModelLegacy

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

Inherited from JObject

JObject::$_errors
Methods
canDelete (line 42)

Method to test whether a record can be deleted.

  • return: True if allowed to delete the record. Defaults to the permission set in the component.
  • since: 1.6
  • access: protected
boolean canDelete (object A $record)
  • object A $record: record object.
canEditState (line 57)

Method to test whether a record can be deleted.

  • return: True if allowed to change the state of the record. Defaults to the permission set in the component.
  • since: 1.6
  • access: protected
boolean canEditState (object A $record)
  • object A $record: record object.
cleanCache (line 291)

Custom clean cache method

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

Redefinition of:
JModelLegacy::cleanCache()
Clean the cache
delete (line 222)

Method to delete groups.

  • return: Returns true on success, false on failure.
  • access: public
boolean delete (array $itemIds)
  • array $itemIds: An array of item ids.
getForm (line 135)

Method to get the menu item 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.
getItem (line 104)

Method to get a menu item.

  • return: Menu item data object on success, false on failure.
  • access: public
mixed &getItem ([integer $itemId = null])
  • integer $itemId: The id of the menu item to get.
getModules (line 254)

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

  • access: public
array &getModules ()
getTable (line 72)

Returns a Table object, always creating it

  • return: A database object
  • access: public
JTable getTable ([type $type = 'MenuType'], [string $prefix = 'JTable'], [array $config = array()])
  • type $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:
JModelLegacy::getTable()
Method to get a table object, load it if necessary.
loadFormData (line 153)

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 84)

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:
JModelLegacy::populateState()
Method to auto-populate the model state.
save (line 174)

Method to save the form data.

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

Inherited Methods

Inherited From JModelForm

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

Inherited From JModelLegacy

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

Inherited From JObject

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

Documentation generated on Tue, 19 Nov 2013 15:07:53 +0100 by phpDocumentor 1.4.3