[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Source view] [Print] [Project Stats]
(no description)
Copyright: | (C) 2016 Open Source Matters, Inc. |
License: | GNU General Public License version 2 or later; see LICENSE.txt |
File Size: | 1183 lines (39 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
FieldModel:: (23 methods):
__construct()
save()
checkDefaultValue()
getParams()
getItem()
getTable()
generateNewTitle()
delete()
getForm()
setFieldValue()
getFieldValue()
getFieldValues()
cleanupValues()
canDelete()
canEditState()
populateState()
getReorderConditions()
loadFormData()
validate()
preprocessForm()
cleanCache()
batchCopy()
batchMove()
Class: FieldModel - X-Ref
Field Model__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. |
save($data) X-Ref |
Method to save the form data. param: array $data The form data. return: boolean True on success, False on error. |
checkDefaultValue($data) X-Ref |
Checks if the default value is valid for the given data. If a string is returned then it can be assumed that the default value is invalid. param: array $data The data. return: true|string true if valid, a string containing the exception message when not. |
getParams($params) X-Ref |
Converts the unknown params into an object. param: mixed $params The params. return: \stdClass Object on success, false on failure. |
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. |
getTable($name = 'Field', $prefix = 'Administrator', $options = array() X-Ref |
Method to get a table object, load it if necessary. param: string $name The table name. Optional. param: string $prefix The class prefix. Optional. param: array $options Configuration array for model. Optional. return: Table A Table object |
generateNewTitle($categoryId, $name, $title) X-Ref |
Method to change the title & name. param: integer $categoryId The id of the category. param: string $name The name. param: string $title The title. return: array Contains the modified title and name. |
delete(&$pks) X-Ref |
Method to delete one or more records. param: array $pks An array of record primary keys. return: boolean True if successful, false if an error occurs. |
getForm($data = array() X-Ref |
Abstract method for getting the form from the model. 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|bool A Form object on success, false on failure |
setFieldValue($fieldId, $itemId, $value) X-Ref |
Setting the value for the given field id, context and item id. param: string $fieldId The field ID. param: string $itemId The ID of the item. param: string $value The value. return: boolean |
getFieldValue($fieldId, $itemId) X-Ref |
Returning the value for the given field id, context and item id. param: string $fieldId The field ID. param: string $itemId The ID of the item. return: NULL|string |
getFieldValues(array $fieldIds, $itemId) X-Ref |
Returning the values for the given field ids, context and item id. param: array $fieldIds The field Ids. param: string $itemId The ID of the item. return: NULL|array |
cleanupValues($context, $itemId) X-Ref |
Cleaning up the values for the given item on the context. param: string $context The context. param: string $itemId The Item ID. return: void |
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 for 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 for the |
populateState() X-Ref |
Stock method to auto-populate the model state. return: void |
getReorderConditions($table) X-Ref |
A protected method to get a set of ordering conditions. param: Table $table A Table object. return: array An array of conditions to add to ordering queries. |
loadFormData() X-Ref |
Method to get the data that should be injected in the form. return: array The default data is an empty array. |
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. |
preprocessForm(Form $form, $data, $group = 'content') X-Ref |
Method to allow derived classes to preprocess the form. param: Form $form A Form object. param: mixed $data The data expected for the form. param: string $group The name of the plugin group to import (defaults to "content"). return: void |
cleanCache($group = null, $clientId = 0) X-Ref |
No description |
batchCopy($value, $pks, $contexts) X-Ref |
Batch copy fields to a new group. param: integer $value The new value matching a fields group. param: array $pks An array of row IDs. param: array $contexts An array of item contexts. return: array|boolean new IDs if successful, false otherwise and internal error is set. |
batchMove($value, $pks, $contexts) X-Ref |
Batch move fields to a new group. param: integer $value The new value matching a fields group. param: array $pks An array of row IDs. param: array $contexts An array of item contexts. return: boolean True if successful, false otherwise and internal error is set. |
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |