Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
applyUpdateSite () | |
refreshUpdates ($force=false) | |
getCheckForSelfUpdate () | |
getUpdateInformation () | |
purge () | |
download () | |
createRestorationFile ($basename=null) | |
createUpdateFile ($basename=null) | |
finaliseUpgrade () | |
cleanUp () | |
upload () | |
captiveLogin ($credentials) | |
captiveFileExists () | |
removePackageFiles () | |
getPhpOptions () | |
getPhpSettings () | |
isDatabaseTypeSupported () | |
isPhpVersionSupported () | |
getIniParserAvailability () | |
getNonCoreExtensions () | |
getNonCorePlugins ($folderFilter=['system', 'user', 'authentication', 'actionlog', 'multifactorauth']) | |
fetchCompatibility ($extensionID, $joomlaTargetVersion) | |
isTemplateActive ($template) | |
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 protégées | |
downloadPackage ($url, $target) | |
translateExtensionName (&$item) | |
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) | |
Fonctions membres privées | |
isChecksumValid ($packagefile, $updateObject) | |
getConfiguredDatabaseType () | |
getTargetMinimumPHPVersion () | |
getUpdateSitesInfo ($extensionID) | |
getCollectionDetailsUrls ($updateSiteInfo, $joomlaTargetVersion) | |
checkCompatibility ($updateFileUrl, $joomlaTargetVersion) | |
Attributs privés | |
$updateInformation = null | |
Membres hérités additionnels | |
Fonctions membres publiques statiques hérités de BaseModel | |
static | addIncludePath ($path='', $prefix='') |
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 protégés statiques hérités de BaseModel | |
static | $paths |
Joomla! update overview Model
applyUpdateSite | ( | ) |
Detects if the Joomla! update site currently in use matches the one configured in this component. If they don't match, it changes it.
"Minor & Patch Release for Current version (recommended and default)". The commented "case" below are for documenting where 'default' and legacy options falls case 'default': case 'lts': case 'sts': (It's shown as "Default" because that option does not exist any more) case 'nochange':
Références $db, $id, $params, $query, Text\_(), Factory\getApplication(), Joomla\Database\getDatabase(), Joomla\CMS\MVC\Model\getDbo(), ExtensionHelper\getExtensionRecord(), ComponentHelper\getParams(), et ParameterType\INTEGER.
captiveFileExists | ( | ) |
Does the captive (temporary) file we uploaded before still exist?
Références File\exists(), Factory\getApplication(), et null.
captiveLogin | ( | $credentials | ) |
Checks the super admin credentials are valid for the currently logged in users
array | $credentials | The credentials to authenticate the user with |
Références $user, Authentication\getInstance(), Factory\getUser(), null, et Authentication\STATUS_SUCCESS.
|
private |
Method to check non core extensions for compatibility.
string | $updateFileUrl | The items update XML url. |
string | $joomlaTargetVersion | The Joomla! version to test against |
Références ComponentHelper\getParams(), et Updater\STABILITY_STABLE.
cleanUp | ( | ) |
Removes the extracted package file and trigger onJoomlaAfterUpdate event.
The onJoomlaAfterUpdate event compares the stored list of files previously overridden with the updated core files, finding out which files have changed during the update, thereby determining how many and which override files need to be checked and possibly updated after the Joomla update.
Références $app, File\delete(), File\exists(), Factory\getApplication(), PluginHelper\importPlugin(), JPATH_ROOT, et null.
createRestorationFile | ( | $basename = null | ) |
Backwards compatibility. Use createUpdateFile() instead.
null | $basename | The basename of the file to create |
createUpdateFile | ( | $basename = null | ) |
Create the update.php file and trigger onJoomlaBeforeUpdate event.
The onJoomlaBeforeUpdate event stores the core files for which overrides have been defined. This will be compared in the onJoomlaAfterUpdate event with the current filesystem state, thereby determining how many and which overrides need to be checked and possibly updated after Joomla installed an update.
string | $basename | Optional base path to the file. |
Références $app, $config, $data, $filesize, $password, $result, File\delete(), File\exists(), UserHelper\genRandomPassword(), Factory\getApplication(), PluginHelper\importPlugin(), File\invalidateFileCache(), JPATH_SITE, et File\write().
download | ( | ) |
Downloads the update package to the site.
Références HttpFactory\getHttp().
|
protected |
Downloads a package file to a specific directory
string | $url | The URL to download from |
string | $target | The directory to store the file |
Références $result, $target, $url, Log\add(), File\delete(), HttpFactory\getHttp(), Log\INFO, Text\sprintf(), et File\write().
fetchCompatibility | ( | $extensionID, | |
$joomlaTargetVersion | |||
) |
Called by controller's fetchExtensionCompatibility, which is called via AJAX.
string | $extensionID | The ID of the checked extension |
string | $joomlaTargetVersion | Target version of Joomla |
finaliseUpgrade | ( | ) |
Finalise the upgrade.
This method will do the following:
It performs essentially the same function as InstallerFile::install() without the file copy.
Références $db, $id, $manifest, $query, $result, Text\_(), Factory\getApplication(), Joomla\Database\getDatabase(), Joomla\CMS\MVC\Model\getDbo(), ExtensionHelper\getExtensionRecord(), Installer\getInstance(), JPATH_ADMINISTRATOR, JPATH_MANIFESTS, JPATH_ROOT, JLoader\register(), et Text\sprintf().
getCheckForSelfUpdate | ( | ) |
Makes sure that the Joomla! Update Component Update is in the database and check if there is a new version.
Références $db, $query, Factory\getApplication(), Joomla\Database\getDatabase(), Joomla\CMS\MVC\Model\getDbo(), Updater\getInstance(), ParameterType\INTEGER, null, et Updater\STABILITY_STABLE.
|
private |
Method to get details URLs from a collection update site for given extension and Joomla target version.
array | $updateSiteInfo | The update site and extension information record to process |
string | $joomlaTargetVersion | The Joomla! version to test against, |
Références $attribs, $extension, $key, $return, $value, et null.
|
private |
Returns the configured database type id (mysqli or sqlsrv or ...)
Références Factory\getApplication().
getIniParserAvailability | ( | ) |
getNonCoreExtensions | ( | ) |
Gets an array containing all installed extensions, that are not core extensions.
Références $db, $extension, $query, $rows, Text\_(), ExtensionHelper\getCoreExtensionIds(), Joomla\Database\getDatabase(), et Joomla\CMS\MVC\Model\getDbo().
getNonCorePlugins | ( | $folderFilter = ['system','user','authentication','actionlog','multifactorauth'] | ) |
Gets an array containing all installed and enabled plugins, that are not core plugins.
array | $folderFilter | Limit the list of plugins to a specific set of folder values |
Références $db, $query, $rows, Text\_(), ExtensionHelper\getCoreExtensionIds(), Joomla\Database\getDatabase(), et Joomla\CMS\MVC\Model\getDbo().
getPhpOptions | ( | ) |
Gets PHP options.
Références $option, $options, Text\_(), Version\MAJOR_VERSION, null, et Text\sprintf().
getPhpSettings | ( | ) |
|
private |
Returns the PHP minimum version for the update. Returns JOOMLA_MINIMUM_PHP, if there is no information given.
Références JOOMLA_MINIMUM_PHP.
getUpdateInformation | ( | ) |
Returns an array with the Joomla! update information.
Références $db, $id, $query, Joomla\Database\getDatabase(), Joomla\CMS\MVC\Model\getDbo(), ExtensionHelper\getExtensionRecord(), ComponentHelper\getParams(), ParameterType\INTEGER, null, et Updater\STABILITY_STABLE.
|
private |
Returns records with update sites and extension information for a given extension ID.
int | $extensionID | The extension ID |
Références $db, $id, $query, $result, Joomla\Database\getDatabase(), Joomla\CMS\MVC\Model\getDbo(), et ParameterType\INTEGER.
|
private |
Return the result of the checksum of a package with the SHA256/SHA384/SHA512 tags in the update server manifest
string | $packagefile | Location of the package to be installed |
Update | $updateObject | The Update Object |
Références $hash.
isDatabaseTypeSupported | ( | ) |
Returns true, if J! version is < 4 or current configured database type is compatible with the update.
Références Version\MAJOR_VERSION.
isPhpVersionSupported | ( | ) |
Returns true, if current installed php version is compatible with the update.
isTemplateActive | ( | $template | ) |
Checks whether a given template is active
string | $template | The template name to be checked |
Références $db, $menu, $query, $template, $value, ArrayHelper\getColumn(), Joomla\Database\getDatabase(), Joomla\CMS\MVC\Model\getDbo(), et ParameterType\STRING.
purge | ( | ) |
Removes all of the updates from the table and enable all update streams.
Références $db, $query, Text\_(), Joomla\Database\getDatabase(), et Joomla\CMS\MVC\Model\getDbo().
refreshUpdates | ( | $force = false | ) |
Makes sure that the Joomla! update cache is up-to-date.
boolean | $force | Force reload, ignoring the cache timeout. |
Références ExtensionHelper\getExtensionRecord(), Updater\getInstance(), ComponentHelper\getParams(), et Updater\STABILITY_STABLE.
removePackageFiles | ( | ) |
Remove the captive (temporary) file we uploaded before and the .
Références File\delete(), File\exists(), Factory\getApplication(), et null.
|
protected |
Translates an extension name
object | &$item | The extension of which the name needs to be translated |
Références $extension, $item, $lang, $path, Text\_(), Factory\getLanguage(), JPATH_ADMINISTRATOR, JPATH_PLUGINS, et JPATH_SITE.
upload | ( | ) |
Uploads what is presumably an update ZIP file under a mangled name in the temporary directory.
Références $input, $result, Text\_(), Factory\getApplication(), null, et File\upload().
|
private |