Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__construct ($config=array(), MVCFactoryInterface $factory=null) | |
getTable ($type='Category', $prefix='Administrator', $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 () | |
Fonctions membres publiques hérités de AdminModel | |
__construct ($config=array(), MVCFactoryInterface $factory=null, FormFactoryInterface $formFactory=null) | |
batch ($commands, $pks, $contexts) | |
checkin ($pks=array()) | |
checkout ($pk=null) | |
delete (&$pks) | |
getItem ($pk=null) | |
publish (&$pks, $value=1) | |
reorder ($pks, $delta=0) | |
save ($data) | |
saveorder ($pks=array(), $order=null) | |
generateTitle ($categoryId, $table) | |
initBatch () | |
editAssociations ($data) | |
Fonctions membres publiques hérités de FormModel | |
__construct ($config=array(), MVCFactoryInterface $factory=null, FormFactoryInterface $formFactory=null) | |
checkin ($pk=null) | |
checkout ($pk=null) | |
validate ($form, $data, $group=null) | |
Fonctions membres publiques hérités de BaseDatabaseModel | |
__construct ($config=array(), MVCFactoryInterface $factory=null) | |
getTable ($name='', $prefix='', $options=array()) | |
isCheckedOut ($item) | |
getDbo () | |
setDbo (DatabaseInterface $db=null) | |
__get ($name) | |
Fonctions membres publiques hérités de BaseModel | |
__construct ($config=array()) | |
getName () | |
Fonctions membres publiques hérités de CMSObject | |
__construct ($properties=null) | |
__toString () | |
def ($property, $default=null) | |
get ($property, $default=null) | |
getProperties ($public=true) | |
getError ($i=null, $toString=true) | |
getErrors () | |
set ($property, $value=null) | |
setProperties ($properties) | |
setError ($error) | |
Fonctions membres publiques hérités de StatefulModelInterface | |
getState ($property=null, $default=null) | |
setState ($property, $value=null) | |
Fonctions membres publiques hérités de DispatcherAwareInterface | |
setDispatcher (DispatcherInterface $dispatcher) | |
Fonctions membres publiques hérités de CurrentUserInterface | |
setCurrentUser (User $currentUser) | |
Fonctions membres publiques hérités de CacheControllerFactoryAwareInterface | |
setCacheControllerFactory (CacheControllerFactoryInterface $factory) | |
Fonctions membres publiques hérités de DatabaseAwareInterface | |
setDatabase (DatabaseInterface $db) | |
Fonctions membres publiques hérités de FormFactoryAwareInterface | |
setFormFactory (FormFactoryInterface $factory) | |
Champs de données | |
$typeAlias = null | |
Champs de données hérités de AdminModel | |
$typeAlias | |
Fonctions membres protégées | |
canDelete ($record) | |
canEditState ($record) | |
populateState () | |
getReorderConditions ($table) | |
loadFormData () | |
preprocessForm (Form $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) | |
Fonctions membres protégées hérités de AdminModel | |
batchAccess ($value, $pks, $contexts) | |
batchCopy ($value, $pks, $contexts) | |
cleanupPostBatchCopy (TableInterface $table, $newId, $oldId) | |
batchLanguage ($value, $pks, $contexts) | |
batchMove ($value, $pks, $contexts) | |
batchTag ($value, $pks, $contexts) | |
canDelete ($record) | |
canEditState ($record) | |
generateNewTitle ($categoryId, $alias, $title) | |
getReorderConditions ($table) | |
populateState () | |
prepareTable ($table) | |
checkCategoryId ($categoryId) | |
redirectToAssociations ($data) | |
Fonctions membres protégées hérités de BaseDatabaseModel | |
_getList ($query, $limitstart=0, $limit=0) | |
_getListCount ($query) | |
_createTable ($name, $prefix='Table', $config=array()) | |
bootComponent ($component) | |
dispatchEvent (EventInterface $event) | |
Attributs protégés | |
$text_prefix = 'COM_CATEGORIES' | |
$associationsContext = 'com_categories.item' | |
Attributs protégés hérités de AdminModel | |
$text_prefix = null | |
$event_after_delete = null | |
$event_after_save = null | |
$event_before_delete = null | |
$event_before_save = null | |
$event_before_change_state = null | |
$event_change_state = null | |
$event_before_batch = null | |
$batch_copymove = 'category_id' | |
$batch_commands | |
$associationsContext = null | |
$batchSet = null | |
$user = null | |
$table = null | |
$tableClassName = null | |
$contentType = null | |
$type = null | |
Attributs protégés hérités de FormModel | |
$events_map = null | |
Attributs protégés hérités de BaseDatabaseModel | |
$option = null | |
$event_clean_cache = null | |
Attributs protégés hérités de BaseModel | |
$name | |
Attributs protégés hérités de CMSObject | |
$_errors = array() | |
Attributs privés | |
$hasAssociation | |
Membres hérités additionnels | |
Fonctions membres publiques statiques hérités de BaseModel | |
static | addIncludePath ($path='', $prefix='') |
Attributs protégés statiques hérités de BaseModel | |
static | $paths |
Categories Component Category Model
__construct | ( | $config = array() , |
|
MVCFactoryInterface | $factory = null |
||
) |
Override parent constructor.
array | $config | An optional associative array of configuration settings. |
MVCFactoryInterface | null | $factory | The factory. |
Références $config, $extension, Symfony\Contracts\Service\__construct(), et Factory\getApplication().
|
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, $this, $title, $type, $value, Text\_(), elseif, Factory\getApplication(), Joomla\Database\getDatabase(), ArrayHelper\getValue(), ParameterType\INTEGER, null, et Text\sprintf().
|
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
Références $db, $id, $query, false, Joomla\Database\getDatabase(), et ParameterType\INTEGER.
|
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, $value, Text\_(), Factory\getApplication(), Joomla\Database\getDatabase(), ParameterType\INTEGER, Text\sprintf(), et ArrayHelper\toInteger().
|
protected |
Method to test whether a record can be deleted.
object | $record | A record object. |
Références Factory\getUser().
|
protected |
Method to test whether a record can have its state changed.
object | $record | A record object. |
Références $user, et Factory\getUser().
|
protected |
Custom clean the cache of com_content and content modules
string | $group | Cache group name. |
integer | $clientId |
Références $extension, et Factory\getApplication().
|
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, et StringHelper\increment().
getAssoc | ( | ) |
Method to determine if a category association is available.
Références $component, $extension, Joomla\CMS\MVC\Model\getState(), Associations\isEnabled(), 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. |
Implémente FormModelInterface.
Références $data, $extension, $form, $parts, Factory\getApplication(), Joomla\CMS\MVC\Model\getState(), Factory\getUser(), Joomla\CMS\MVC\Model\loadForm(), et Joomla\CMS\MVC\Model\setState().
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, $result, CategoriesHelper\getAssociations(), Joomla\CMS\MVC\Model\getState(), null, et ArrayHelper\toInteger().
|
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
Category | $table | Current table instance |
Références $db, et Joomla\Database\getDatabase().
getTable | ( | $type = 'Category' , |
|
$prefix = 'Administrator' , |
|||
$config = array() |
|||
) |
|
protected |
Method to get the data that should be injected in the form.
Références $app, $data, $extension, $filters, Factory\getApplication(), null, et Joomla\CMS\MVC\Model\preprocessData().
|
protected |
Auto-populate the model state.
Note. Calling getState in this method will result in recursion.
Références $app, $extension, $params, $parts, Factory\getApplication(), ComponentHelper\getParams(), null, et Joomla\CMS\MVC\Model\setState().
Method to preprocess the form.
Form | $form | A Form object. |
mixed | $data | The data expected for the form. |
string | $group | The name of the plugin group to import. |
Références $component, $data, $extension, $field, $fields, $form, $lang, $language, $languages, $name, $path, $section, Text\_(), Path\clean(), Factory\getApplication(), Factory\getLanguage(), Joomla\CMS\MVC\Model\getState(), JPATH_ADMINISTRATOR, JPATH_BASE, Form\loadFile(), null, Joomla\CMS\MVC\Model\preprocessForm(), 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 $extension, $value, Factory\getApplication(), et PluginHelper\importPlugin().
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, $id, $input, $key, $name, $query, $result, $this, $title, Text\_(), Factory\getApplication(), Joomla\Database\getDatabase(), Joomla\CMS\MVC\Model\getState(), PluginHelper\importPlugin(), ParameterType\INTEGER, null, Joomla\CMS\MVC\Model\setState(), ParameterType\STRING, 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.
Form | $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 Factory\getUser().
|
protected |
|
private |
|
protected |
$typeAlias = null |