Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
getForm ($data=array(), $loadData=true) | |
getHelp () | |
getItem ($pk=null) | |
getModules () | |
getViewLevels () | |
getTable ($type='Menu', $prefix='Administrator', $config=array()) | |
rebuild () | |
save ($data) | |
saveorder ($idArray=null, $lftArray=null) | |
setHome (&$pks, $value=1) | |
publish (&$pks, $value=1) | |
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 = 'com_menus.item' | |
Champs de données hérités de AdminModel | |
$typeAlias | |
Fonctions membres protégées | |
canDelete ($record) | |
canEditState ($record) | |
batchCopy ($value, $pks, $contexts) | |
batchMove ($value, $pks, $contexts) | |
canSave ($data=array(), $key='id') | |
loadFormData () | |
getReorderConditions ($table) | |
populateState () | |
getMenuType ($menutype) | |
getMenuTypeId ($menutype) | |
preprocessForm (Form $form, $data, $group='content') | |
generateNewTitle ($parentId, $alias, $title) | |
cleanCache ($group=null, $clientId=0) | |
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 | |
$associationsContext = 'com_menus.item' | |
$text_prefix = 'COM_MENUS_ITEM' | |
$helpKey = 'Menu_Item:_New_Item' | |
$helpURL | |
$helpLocal = false | |
$batch_copymove = 'menu_id' | |
$batch_commands | |
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() | |
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 |
|
protected |
Batch copy menu items to a new menu or parent.
integer | $value | The new menu or sub-item. |
array | $pks | An array of row IDs. |
array | $contexts | An array of item contexts. |
Références $count, $db, $menuType, $parts, $query, $title, $user, $value, Text\_(), Joomla\Database\getDatabase(), Factory\getUser(), ArrayHelper\getValue(), ParameterType\INTEGER, null, et Text\sprintf().
|
protected |
Batch move menu items to a new menu or parent.
integer | $value | The new menu or sub-item. |
array | $pks | An array of row IDs. |
array | $contexts | An array of item contexts. |
Références $db, $menuType, $parts, $query, $user, $value, Text\_(), Joomla\Database\getDatabase(), Factory\getUser(), ArrayHelper\getValue(), 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 the state of a record can be edited.
object | $record | A record object. |
Références Factory\getUser().
|
protected |
Method to check if you can save a record.
array | $data | An array of input data. |
string | $key | The name of the key for the primary key. |
Références Factory\getUser().
|
protected |
Custom clean the cache
string | $group | Cache group name. |
integer | $clientId |
|
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().
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 $clientId, $data, $form, $item, Joomla\CMS\MVC\Model\getState(), ArrayHelper\getValue(), Joomla\CMS\MVC\Model\loadForm(), Joomla\CMS\MVC\Model\loadFormData(), et Joomla\CMS\MVC\Model\setState().
getHelp | ( | ) |
Get the necessary data to load an item help screen.
getItem | ( | $pk = null | ) |
Method to get a menu item.
integer | $pk | An optional id of the object to get, otherwise the id from the model state is used. |
Références $component, $lang, $link, $result, $this, $type, MenusHelper\getAssociations(), ComponentHelper\getComponent(), Factory\getLanguage(), MenusHelper\getLinkKey(), Joomla\CMS\MVC\Model\getState(), Associations\isEnabled(), JPATH_ADMINISTRATOR, null, Joomla\CMS\MVC\Model\setState(), et ArrayHelper\toObject().
|
protected |
Loads the menutype object by a given menutype string
string | $menutype | The given menutype |
Références $menutype.
|
protected |
getModules | ( | ) |
Get the list of modules not in trash.
Join on the module-to-menu mapping table. We are only interested if the module is displayed on ALL or THIS menu item (or the inverse ID number). sqlsrv changes for modulelink to menu manager
Références $clientId, $db, $id, $query, $result, Joomla\Database\getDatabase(), Joomla\CMS\MVC\Model\getState(), et ParameterType\INTEGER.
|
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 menutype.
\Joomla\CMS\Table\Menu | $table |
Références $db, et Joomla\Database\getDatabase().
getTable | ( | $type = 'Menu' , |
|
$prefix = 'Administrator' , |
|||
$config = array() |
|||
) |
getViewLevels | ( | ) |
Get the list of all view levels
Références $db, $query, $result, et Joomla\Database\getDatabase().
|
protected |
Method to get the data that should be injected in the form.
Références $data, $filters, Factory\getApplication(), Joomla\CMS\MVC\Model\getState(), null, Joomla\CMS\MVC\Model\preprocessData(), et Joomla\CMS\MVC\Model\setState().
|
protected |
Auto-populate the model state.
Note. Calling getState in this method will result in recursion.
Note: a new menu item will have no field type. The field is required so the user has to change it.
Références $app, $clientId, $link, $menuType, $params, $type, 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 $base, $clientId, $data, $field, $fields, $form, $helpURL, $language, $languages, $layout, $link, $option, $path, $templatePath, $type, $view, $xml, Text\_(), Path\clean(), elseif, Path\find(), ApplicationHelper\getClientInfo(), Joomla\CMS\MVC\Model\getState(), Associations\isEnabled(), JPATH_ADMINISTRATOR, null, et Joomla\CMS\MVC\Model\preprocessForm().
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 $i, $value, Text\_(), et Factory\getApplication().
rebuild | ( | ) |
Method rebuild the entire nested set tree.
Références $db, $id, $item, $items, $params, $query, Factory\getApplication(), Joomla\Database\getDatabase(), et ParameterType\INTEGER.
save | ( | $data | ) |
Method to save the form data.
array | $data | The form data. |
Références $base, $context, $data, $db, $id, $key, $menuType, $name, $option, $query, $result, $this, $title, Text\_(), Uri\base(), elseif, Factory\getApplication(), Joomla\Database\getDatabase(), Uri\getInstance(), Joomla\CMS\MVC\Model\getState(), PluginHelper\importPlugin(), ParameterType\INTEGER, Associations\isEnabled(), 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 | Rows identifiers to be reordered |
array | $lftArray | lft values of rows to be reordered |
setHome | ( | & | $pks, |
$value = 1 |
|||
) |
Method to change the home state of one or more items.
array | $pks | A list of the primary keys to change. |
integer | $value | The value of the home state. |
Références $i, $languages, $value, Text\_(), elseif, Factory\getApplication(), et Text\sprintf().
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
$typeAlias = 'com_menus.item' |