Joomla CMS  3.9.25 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.9.25 et du framework Joomla Platform intégré
Référence de la classe InstallerScript

Fonctions membres publiques

 preflight ($type, $parent)
 
 getInstances ($isModule)
 
 getParam ($name, $id=0)
 
 setParams ($paramArray=null, $type='edit', $id=0)
 
 getItemArray ($element, $table, $column, $identifier)
 
 removeFiles ()
 
 moveCliFiles ()
 

Attributs protégés

 $release
 
 $paramTable
 
 $extension
 
 $deleteFiles = array()
 
 $deleteFolders = array()
 
 $cliScriptFiles = array()
 
 $minimumPhp
 
 $minimumJoomla
 
 $allowDowngrades = false
 

Description détaillée

Base install script for use by extensions providing helper methods for common behaviours.

Depuis
3.6

Documentation des fonctions membres

◆ getInstances()

getInstances (   $isModule)

Gets each instance of a module in the #__modules table

Paramètres
boolean$isModuleTrue if the extension is a module as this can have multiple instances
Renvoie
array An array of ID's of the extension
Depuis
3.6

Références $db, $query, et extension.

◆ getItemArray()

getItemArray (   $element,
  $table,
  $column,
  $identifier 
)

Builds a standard select query to produce better DRY code in this script. This should produce a single unique cell which is json encoded - it will then return an associated array with this data in.

Paramètres
string$elementThe element to get from the query
string$tableThe table to search for the data in
string$columnThe column of the database to search from
mixed$identifierThe integer id or the already quoted string
Renvoie
array Associated array containing data from the cell
Depuis
3.6

Références $db, et $query.

◆ getParam()

getParam (   $name,
  $id = 0 
)

Gets parameter value in the extensions row of the extension table

Paramètres
string$nameThe name of the parameter to be retrieved
integer$idThe id of the item in the Param Table
Renvoie
string The parameter desired
Depuis
3.6

Références $id, $name, et $params.

◆ moveCliFiles()

moveCliFiles ( )

Moves the CLI scripts into the CLI folder in the CMS

Renvoie
void
Depuis
3.6

Références $file, $name, et JPATH_ROOT.

◆ preflight()

preflight (   $type,
  $parent 
)

Function called before extension installation/update/removal procedure commences

Paramètres
string$typeThe type of change (install, update or discover_install, not uninstall)
InstallerAdapter$parentThe class calling this method
Renvoie
boolean True on success
Depuis
3.6

Références $manifest, $type, et extension.

◆ removeFiles()

removeFiles ( )

Remove the files and folders in the given array from

Renvoie
void
Depuis
3.6

Références $file, $folder, et JPATH_ROOT.

◆ setParams()

setParams (   $paramArray = null,
  $type = 'edit',
  $id = 0 
)

Sets parameter values in the extensions row of the extension table. Note that the this must be called separately for deleting and editing. Note if edit is called as a type then if the param doesn't exist it will be created

Paramètres
array$paramArrayThe array of parameters to be added/edited/removed
string$typeThe type of change to be made to the param (edit/remove)
integer$idThe id of the item in the relevant table
Renvoie
boolean True on success
Depuis
3.6

Références $db, $id, $name, $params, $query, $type, $value, elseif, et json_encode.

Documentation des champs

◆ $allowDowngrades

$allowDowngrades = false
protected

◆ $cliScriptFiles

$cliScriptFiles = array()
protected

◆ $deleteFiles

$deleteFiles = array()
protected

◆ $deleteFolders

$deleteFolders = array()
protected

◆ $extension

$extension
protected

◆ $minimumJoomla

$minimumJoomla
protected

◆ $minimumPhp

$minimumPhp
protected

◆ $paramTable

$paramTable
protected

◆ $release

$release
protected

La documentation de cette classe a été générée à partir du fichier suivant :