[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Source view] [Print] [Project Stats]
(no description)
Copyright: | (C) 2008 Open Source Matters, Inc. |
License: | GNU General Public License version 2 or later; see LICENSE.txt |
File Size: | 1108 lines (39 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
ArticleModel:: (19 methods):
__construct()
cleanupPostBatchCopy()
batchMove()
canDelete()
canEditState()
prepareTable()
publish()
getItem()
getForm()
loadFormData()
validate()
save()
featured()
getReorderConditions()
preprocessForm()
cleanCache()
hit()
canCreateCategory()
delete()
Class: ArticleModel - X-Ref
Item Model for an Article.__construct($config = array() X-Ref |
Constructor. param: array $config An array of configuration options (name, state, dbo, table_path, ignore_request). param: MVCFactoryInterface $factory The factory. param: FormFactoryInterface $formFactory The form factory. |
cleanupPostBatchCopy(TableInterface $table, $newId, $oldId) X-Ref |
Function that can be overridden to do any data cleanup after batch copying data param: TableInterface $table The table object containing the newly created item param: integer $newId The id of the new item param: integer $oldId The original item id return: void |
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. |
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 edited. 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. |
prepareTable($table) X-Ref |
Prepare and sanitise the table data prior to saving. param: \Joomla\CMS\Table\Table $table A Table object. return: void |
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. |
getItem($pk = null) X-Ref |
Method to get a single record. param: integer $pk The id of the primary key. return: mixed Object on success, false on failure. |
getForm($data = array() X-Ref |
Method to get the record 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: Form|boolean 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. |
validate($form, $data, $group = null) X-Ref |
Method to validate the form data. param: Form $form The form to validate against. param: array $data The data to validate. param: string $group The name of the field group to validate. return: array|boolean Array of filtered data if valid, false otherwise. |
save($data) X-Ref |
Method to save the form data. param: array $data The form data. return: boolean True on success. |
featured($pks, $value = 0, $featuredUp = null, $featuredDown = null) X-Ref |
Method to toggle the featured setting of articles. param: array $pks The ids of the items to toggle. param: integer $value The value to toggle to. param: string|Date $featuredUp The date which item featured up. param: string|Date $featuredDown The date which item featured down. return: boolean True on success. |
getReorderConditions($table) X-Ref |
A protected method to get a set of ordering conditions. param: object $table A record object. return: array An array of conditions to add to ordering queries. |
preprocessForm(Form $form, $data, $group = 'content') X-Ref |
Allows preprocessing of the Form object. param: Form $form The form object param: array $data The data to be merged into the form object param: string $group The plugin group to be executed return: void |
cleanCache($group = null, $clientId = 0) X-Ref |
Custom clean the cache of com_content and content modules param: string $group The cache group param: integer $clientId @deprecated 5.0 No longer used. return: void |
hit() X-Ref |
Void hit function for pagebreak when editing content from frontend return: void |
canCreateCategory() X-Ref |
Is the user allowed to create an on the fly category? return: boolean |
delete(&$pks) X-Ref |
Delete #__content_frontpage items if the deleted articles was featured param: object $pks The primary key related to the contents that was deleted. return: boolean |
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |