[ Index ]

PHP Cross Reference of Joomla 2.5.4 DE

title

Body

[close]

/administrator/components/com_categories/models/ -> category.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: 909 lines (24 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

CategoriesModelCategory:: (17 methods):
  canDelete()
  canEditState()
  getTable()
  populateState()
  getItem()
  getForm()
  getReorderConditions()
  loadFormData()
  preprocessForm()
  save()
  publish()
  rebuild()
  saveorder()
  batchCopy()
  batchMove()
  cleanCache()
  generateNewTitle()


Class: CategoriesModelCategory  - X-Ref

Categories Component Category Model

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

param: object  $record  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 changed.

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

getTable($type = 'Category', $prefix = 'CategoriesTable', $config = array()   X-Ref
Method to get a table object, load it if necessary.

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

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

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

return: void

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

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

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

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 extension

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

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

return: mixed  The data for the form.

preprocessForm(JForm $form, $data, $group = 'content')   X-Ref
Method to preprocess the form.

param: JForm   $form    A JForm object.
param: mixed   $data    The data expected for the form.
param: string  $groups  The name of the plugin group to import.
return: void

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

param: array  $data  The form data.
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: integer  $value  The value of the published state.
return: boolean  True on success.

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

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

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    An array of primary key ids.
param: integer  $lft_array  The lft value
return: boolean  False on failure or error, True otherwise

batchCopy($value, $pks, $contexts)   X-Ref
Batch copy categories to a new category.

param: integer  $value     The new category.
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 categories to a new category.

param: integer  $value     The new category ID.
param: array    $pks       An array of row IDs.
param: array    $contexts  An array of item contexts.
return: boolean  True on success.

cleanCache($group = null, $client_id = 0)   X-Ref
Custom clean the cache of com_content and content modules


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.



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