[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/administrator/components/com_tags/src/Model/ -> TagModel.php (summary)

(no description)

Copyright: (C) 2013 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 413 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

TagModel:: (10 methods):
  canDelete()
  populateState()
  getItem()
  getForm()
  loadFormData()
  save()
  prepareTable()
  rebuild()
  saveorder()
  generateNewTitle()


Class: TagModel  - X-Ref

Tags Component Tag 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.

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

return: void

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

param: integer  $pk  An optional id of the object to get, otherwise the id from the model state is used.
return: mixed  Tag 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: bool|\Joomla\CMS\Form\Form  A Form 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.

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

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

prepareTable($table)   X-Ref
Prepare and sanitise the table data prior to saving.

param: \Joomla\CMS\Table\Table  $table  A Table object.
return: void

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

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

saveorder($idArray = null, $lftArray = 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  $lftArray  The lft value
return: boolean  False on failure or error, True otherwise

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

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



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer