[ Index ]

PHP Cross Reference of Joomla 2.5.4 DE

title

Body

[close]

/administrator/components/com_menus/models/ -> item.php (summary)

(no description)

Copyright: Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 1396 lines (38 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

MenusModelItem:: (22 methods):
  canDelete()
  canEditState()
  batch()
  batchCopy()
  batchMove()
  canSave()
  getForm()
  loadFormData()
  getHelp()
  getItem()
  getModules()
  getReorderConditions()
  getTable()
  populateState()
  preprocessForm()
  rebuild()
  save()
  saveorder()
  setHome()
  publish()
  generateNewTitle()
  cleanCache()


Class: MenusModelItem  - X-Ref

Menu Item Model for Menus.

canDelete($record)   X-Ref
Method to test whether a record can be deleted.

param: object    A record object.
return: boolean    True if allowed to delete the record. Defaults to the permission set in the component.

canEditState($record)   X-Ref
Method to test whether a record can have its state edited.

param: object    A record object.
return: boolean    True if allowed to change the state of the record. Defaults to the permission set in the component.

batch($commands, $pks, $contexts)   X-Ref
Method to perform batch operations on an item or a set of items.

param: array  $commands  An array of commands to perform.
param: array  $pks       An array of item ids.
param: array  $contexts  An array of item contexts.
return: boolean  Returns true on success, false on failure.

batchCopy($value, $pks, $contexts)   X-Ref
Batch copy menu items to a new menu or parent.

param: integer  $value     The new menu or sub-item.
param: array    $pks       An array of row IDs.
param: array    $contexts  An array of item contexts.
return: mixed  An array of new IDs on success, boolean false on failure.

batchMove($value, $pks, $contexts)   X-Ref
Batch move menu items to a new menu or parent.

param: integer  $value     The new menu or sub-item.
param: array    $pks       An array of row IDs.
param: array    $contexts  An array of item contexts.
return: boolean  True on success.

canSave($data = array()   X-Ref
Method to check if you can save a record.

param: array    $data    An array of input data.
param: string    $key    The name of the key for the primary key.
return: boolean

getForm($data = array()   X-Ref
Method to get the row form.

param: array    $data        Data for the form.
param: boolean    $loadData    True if the form is to load its own data (default case), false if not.
return: mixed    A JForm object on success, false on failure

loadFormData()   X-Ref
Method to get the data that should be injected in the form.

return: mixed    The data for the form.

getHelp()   X-Ref
Get the necessary data to load an item help screen.

return: object    An object with key, url, and local properties for loading the item help screen.

getItem($pk = null)   X-Ref
Method to get a menu item.

param: integer    $pk    An optional id of the object to get, otherwise the id from the model state is used.
return: mixed    Menu item data object on success, false on failure.

getModules()   X-Ref
Get the list of modules not in trash.

return: mixed    An array of module records (id, title, position), or false on error.

getReorderConditions($table)   X-Ref
A protected method to get the where clause for the reorder
This ensures that the row will be moved relative to a row with the same menutype

param: JTableMenu $table instance
return: array    An array of conditions to add to add to ordering queries.

getTable($type = 'Menu', $prefix = 'MenusTable', $config = array()   X-Ref
Returns a Table object, always creating it

param: type    $type    The table type to instantiate
param: string    $prefix    A prefix for the table class name. Optional.
param: array    $config    Configuration array for model. Optional.
return: JTable    A database object

populateState()   X-Ref
Auto-populate the model state.

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

return: void

preprocessForm(JForm $form, $data, $group = 'content')   X-Ref

param: object    $form    A form object.
param: mixed    $data    The data expected for the form.
return: void

rebuild()   X-Ref
Method rebuild the entire nested set tree.

return: boolean    False on failure or error, true otherwise.

save($data)   X-Ref
Method to save the form data.

param: array    $data    The form data.
return: boolean    True on success.

saveorder($idArray = null, $lft_array = null)   X-Ref
Method to save the reordered nested set tree.
First we save the new order values in the lft values of the changed ids.
Then we invoke the table rebuild to implement the new ordering.

param: array    $idArray    id's of rows to be reordered
param: array    $lft_array    lft values of rows to be reordered
return: boolean false on failuer or error, true otherwise

setHome(&$pks, $value = 1)   X-Ref
Method to change the home state of one or more items.

param: array    $pks    A list of the primary keys to change.
param: int        $value    The value of the home state.
return: boolean    True on success.

publish(&$pks, $value = 1)   X-Ref
Method to change the published state of one or more records.

param: array    $pks    A list of the primary keys to change.
param: int        $value    The value of the published state.
return: boolean    True on success.

generateNewTitle($parent_id, $alias, $title)   X-Ref
Method to change the title & alias.

param: integer  $parent_id  The id of the parent.
param: string   $alias      The alias.
param: string   $title      The title.
return: array  Contains the modified title and alias.

cleanCache($group = null, $client_id = 0)   X-Ref
Custom clean cache method




Generated: Tue Apr 3 11:40:28 2012 Cross-referenced by PHPXref 0.7.1