|
| __construct ($config=array()) |
|
| save ($data) |
|
| getItem ($pk=null) |
|
| getTable ($name='Field', $prefix='FieldsTable', $options=array()) |
|
| delete (&$pks) |
|
| getForm ($data=array(), $loadData=true) |
|
| setFieldValue ($fieldId, $itemId, $value) |
|
| getFieldValue ($fieldId, $itemId) |
|
| getFieldValues (array $fieldIds, $itemId) |
|
| cleanupValues ($context, $itemId) |
|
| validate ($form, $data, $group=null) |
|
◆ __construct()
__construct |
( |
|
$config = array() | ) |
|
Constructor.
- Paramètres
-
array | $config | An optional associative array of configuration settings. |
- Voir également
- JModelLegacy
- Depuis
- 3.7.0
Références $config.
◆ batchCopy()
batchCopy |
( |
|
$value, |
|
|
|
$pks, |
|
|
|
$contexts |
|
) |
| |
|
protected |
Batch copy fields to a new group.
- Paramètres
-
integer | $value | The new value matching a fields group. |
array | $pks | An array of row IDs. |
array | $contexts | An array of item contexts. |
- Renvoie
- array|boolean new IDs if successful, false otherwise and internal error is set.
- Depuis
- 3.7.0
Références $component, $user, et $value.
◆ batchMove()
batchMove |
( |
|
$value, |
|
|
|
$pks, |
|
|
|
$contexts |
|
) |
| |
|
protected |
Batch move fields to a new group.
- Paramètres
-
integer | $value | The new value matching a fields group. |
array | $pks | An array of row IDs. |
array | $contexts | An array of item contexts. |
- Renvoie
- boolean True if successful, false otherwise and internal error is set.
- Depuis
- 3.7.0
Références $context, $user, et $value.
◆ canDelete()
Method to test whether a record can be deleted.
- Paramètres
-
object | $record | A record object. |
- Renvoie
- boolean True if allowed to delete the record. Defaults to the permission for the component.
- Depuis
- 3.7.0
Références $parts, et FieldsHelper\extract().
◆ canEditState()
Method to test whether a record can have its state changed.
- Paramètres
-
object | $record | A record object. |
- Renvoie
- boolean True if allowed to change the state of the record. Defaults to the permission for the component.
- Depuis
- 3.7.0
Références $parts, $user, et FieldsHelper\extract().
◆ checkDefaultValue()
checkDefaultValue |
( |
|
$data | ) |
|
|
private |
◆ cleanCache()
cleanCache |
( |
|
$group = null , |
|
|
|
$clientId = 0 |
|
) |
| |
|
protected |
Clean the cache
- Paramètres
-
string | $group | The cache group |
integer | $clientId | The ID of the client |
- Renvoie
- void
- Depuis
- 3.7.0
Références $context.
◆ cleanupValues()
cleanupValues |
( |
|
$context, |
|
|
|
$itemId |
|
) |
| |
Cleaning up the values for the given item on the context.
- Paramètres
-
string | $context | The context. |
string | $itemId | The Item ID. |
- Renvoie
- void
- Depuis
- 3.7.0
Références $context, $itemId, et $query.
◆ delete()
Method to delete one or more records.
- Paramètres
-
array | $pks | An array of record primary keys. |
- Renvoie
- boolean True if successful, false if an error occurs.
- Depuis
- 3.7.0
Références $query.
◆ generateNewTitle()
generateNewTitle |
( |
|
$categoryId, |
|
|
|
$name, |
|
|
|
$title |
|
) |
| |
|
protected |
Method to change the title & name.
- Paramètres
-
integer | $categoryId | The id of the category. |
string | $name | The name. |
string | $title | The title. |
- Renvoie
- array Contains the modified title and name.
- Depuis
- 3.7.0
Références $name, et $title.
◆ getFieldValue()
getFieldValue |
( |
|
$fieldId, |
|
|
|
$itemId |
|
) |
| |
Returning the value for the given field id, context and item id.
- Paramètres
-
string | $fieldId | The field ID. |
string | $itemId | The ID of the item. |
- Renvoie
- NULL|string
- Depuis
- 3.7.0
Références $itemId, et null.
◆ getFieldValues()
getFieldValues |
( |
array |
$fieldIds, |
|
|
|
$itemId |
|
) |
| |
Returning the values for the given field ids, context and item id.
- Paramètres
-
array | $fieldIds | The field Ids. |
string | $itemId | The ID of the item. |
- Renvoie
- NULL|array
- Depuis
- 3.7.0
Références $data, $itemId, $key, $query, $row, et $rows.
◆ getForm()
getForm |
( |
|
$data = array() , |
|
|
|
$loadData = true |
|
) |
| |
Abstract method for getting the form from the model.
- Paramètres
-
array | $data | Data for the form. |
boolean | $loadData | True if the form is to load its own data (default case), false if not. |
- Renvoie
- mixed A JForm object on success, false on failure
- Depuis
- 3.7.0
Références $context, $data, $form, $jinput, $parts, et FieldsHelper\extract().
◆ getItem()
Method to get a single record.
- Paramètres
-
integer | $pk | The id of the primary key. |
- Renvoie
- mixed Object on success, false on failure.
- Depuis
- 3.7.0
Références $db, $query, Registry\loadString(), et null.
◆ getParams()
Converts the unknown params into an object.
- Paramètres
-
- Renvoie
- stdClass Object on success, false on failure.
- Depuis
- 3.7.0
Références $params.
◆ getReorderConditions()
getReorderConditions |
( |
|
$table | ) |
|
|
protected |
A protected method to get a set of ordering conditions.
- Paramètres
-
JTable | $table | A JTable object. |
- Renvoie
- array An array of conditions to add to ordering queries.
- Depuis
- 3.7.0
◆ getTable()
getTable |
( |
|
$name = 'Field' , |
|
|
|
$prefix = 'FieldsTable' , |
|
|
|
$options = array() |
|
) |
| |
Method to get a table object, load it if necessary.
- Paramètres
-
string | $name | The table name. Optional. |
string | $prefix | The class prefix. Optional. |
array | $options | Configuration array for model. Optional. |
- Renvoie
- JTable A JTable object
- Depuis
- 3.7.0
- Exceptions
-
Références $name, $options, $prefix, et JPATH_ADMINISTRATOR.
◆ loadFormData()
Method to get the data that should be injected in the form.
- Renvoie
- array The default data is an empty array.
- Depuis
- 3.7.0
Références $app, $data, $filters, et null.
◆ populateState()
◆ preprocessForm()
preprocessForm |
( |
JForm |
$form, |
|
|
|
$data, |
|
|
|
$group = 'content' |
|
) |
| |
|
protected |
Method to allow derived classes to preprocess the form.
- Paramètres
-
JForm | $form | A JForm object. |
mixed | $data | The data expected for the form. |
string | $group | The name of the plugin group to import (defaults to "content"). |
- Renvoie
- void
- Voir également
- JFormField
- Depuis
- 3.7.0
- Exceptions
-
Exception | if there is an error in the form event. |
Références $component, $data, $form, $key, $lang, $path, $section, JPATH_ADMINISTRATOR, JPATH_BASE, et null.
◆ save()
Method to save the form data.
- Paramètres
-
- Renvoie
- boolean True on success, False on error.
- Depuis
- 3.7.0
Références $data, $db, $field, $id, $input, $message, $name, $names, $param, $query, $title, FieldsHelper\clearFieldsCache(), et null.
◆ setFieldValue()
setFieldValue |
( |
|
$fieldId, |
|
|
|
$itemId, |
|
|
|
$value |
|
) |
| |
◆ validate()
validate |
( |
|
$form, |
|
|
|
$data, |
|
|
|
$group = null |
|
) |
| |
Method to validate the form data.
- Paramètres
-
JForm | $form | The form to validate against. |
array | $data | The data to validate. |
string | $group | The name of the field group to validate. |
- Renvoie
- array|boolean Array of filtered data if valid, false otherwise.
- Voir également
- JFormRule
-
JFilterInput
- Depuis
- 3.9.23
Références $data, $form, et validate().
◆ $batch_commands
Valeur initiale := array(
'assetgroup_id' => 'batchAccess',
'language_id' => 'batchLanguage'
)
◆ $batch_copymove
$batch_copymove = 'group_id' |
|
protected |
◆ $text_prefix
$text_prefix = 'COM_FIELDS' |
|
protected |
◆ $typeAlias
◆ $valueCache
La documentation de cette classe a été générée à partir du fichier suivant :