Joomla CMS
3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
|
Fonctions membres publiques | |
__construct ($config=array()) | |
getTable ($type='Category', $prefix='CategoriesTable', $config=array()) | |
getItem ($pk=null) | |
getForm ($data=array(), $loadData=true) | |
validate ($form, $data, $group=null) | |
save ($data) | |
publish (&$pks, $value=1) | |
rebuild () | |
saveorder ($idArray=null, $lftArray=null) | |
getAssoc () | |
Champs de données | |
$typeAlias = null | |
Fonctions membres protégées | |
canDelete ($record) | |
canEditState ($record) | |
populateState () | |
getReorderConditions ($table) | |
loadFormData () | |
preprocessForm (JForm $form, $data, $group='content') | |
batchFlipordering ($value, $pks, $contexts) | |
batchCopy ($value, $pks, $contexts) | |
batchMove ($value, $pks, $contexts) | |
cleanCache ($group=null, $clientId=0) | |
generateNewTitle ($parentId, $alias, $title) | |
Attributs protégés | |
$text_prefix = 'COM_CATEGORIES' | |
$associationsContext = 'com_categories.item' | |
Attributs privés | |
$hasAssociation | |
Categories Component Category Model
__construct | ( | $config = array() | ) |
Override parent constructor.
array | $config | An optional associative array of configuration settings. |
Références $config, et $extension.
|
protected |
Batch copy categories to a new category.
integer | $value | The new category. |
array | $pks | An array of row IDs. |
array | $contexts | An array of item contexts. |
Références $canCreate, $count, $db, $extension, $parts, $query, $title, $type, $value, elseif, et null.
|
protected |
Batch flip category ordering.
integer | $value | The new category. |
array | $pks | An array of row IDs. |
array | $contexts | An array of item contexts. |
For each category get the max ordering value Re-order with max - ordering
|
protected |
Batch move categories to a new category.
integer | $value | The new category ID. |
array | $pks | An array of row IDs. |
array | $contexts | An array of item contexts. |
Références $canCreate, $db, $extension, $query, $type, et $value.
|
protected |
Method to test whether a record can be deleted.
object | $record | A record object. |
|
protected |
Method to test whether a record can have its state changed.
object | $record | A record object. |
Références $user.
|
protected |
Custom clean the cache of com_content and content modules
string | $group | Cache group name. |
integer | $clientId | Application client id. |
Références $extension.
|
protected |
Method to change the title & alias.
integer | $parentId | The id of the parent. |
string | $alias | The alias. |
string | $title | The title. |
Références $title.
getAssoc | ( | ) |
Method to determine if a category association is available.
Références $component, $extension, JPATH_SITE, et JLoader\register().
getForm | ( | $data = array() , |
|
$loadData = true |
|||
) |
Method to get the row form.
array | $data | Data for the form. |
boolean | $loadData | True if the form is to load its own data (default case), false if not. |
Références $data, $extension, $form, $jinput, et $parts.
getItem | ( | $pk = null | ) |
Method to get a category.
integer | $pk | An optional id of the object to get, otherwise the id from the model state is used. |
Références $assoc, CategoriesHelper\getAssociations(), et null.
|
protected |
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
JTableCategory | $table | Current table instance |
getTable | ( | $type = 'Category' , |
|
$prefix = 'CategoriesTable' , |
|||
$config = array() |
|||
) |
|
protected |
Method to get the data that should be injected in the form.
Références $app, $data, $extension, $filters, et null.
|
protected |
Auto-populate the model state.
Note. Calling getState in this method will result in recursion.
Références $app, $extension, $params, $parts, et null.
|
protected |
Method to preprocess the form.
JForm | $form | A JForm object. |
mixed | $data | The data expected for the form. |
string | $group | The name of the plugin group to import. |
Exception | if there is an error in the form event. |
Références $component, $data, $extension, $field, $fields, $form, $lang, $language, $name, $path, $section, jimport(), JPATH_ADMINISTRATOR, JPATH_BASE, null, et JLoader\register().
publish | ( | & | $pks, |
$value = 1 |
|||
) |
Method to change the published state of one or more records.
array | $pks | A list of the primary keys to change. |
integer | $value | The value of the published state. |
Références $dispatcher, $extension, $value, et JEventDispatcher\getInstance().
rebuild | ( | ) |
Method rebuild the entire nested set tree.
save | ( | $data | ) |
Method to save the form data.
array | $data | The form data. |
Références $assoc, $context, $data, $db, $dispatcher, $id, $input, $key, $name, $query, $title, JEventDispatcher\getInstance(), json_encode, option, JError\raiseNotice(), et ArrayHelper\toInteger().
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.
array | $idArray | An array of primary key ids. |
integer | $lftArray | The lft value |
validate | ( | $form, | |
$data, | |||
$group = null |
|||
) |
Method to validate the form data.
JForm | $form | The form to validate against. |
array | $data | The data to validate. |
string | $group | The name of the field group to validate. |
Références $data, $form, et validate().
|
protected |
|
private |
|
protected |
$typeAlias = null |