Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
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 ()
 
 addDashboardMenu (string $dashboard, string $preset)
 

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

◆ addDashboardMenu()

addDashboardMenu ( string  $dashboard,
string  $preset 
)

Creates the dashboard menu module

Paramètres
string$dashboardThe name of the dashboard
string$presetThe name of the menu preset
Renvoie
void
Exceptions

Références $model, $module, $title, Text\_(), extension, Factory\getApplication(), et Text\sprintf().

◆ 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, $extension, $query, et Factory\getDbo().

◆ 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 string
Renvoie
array Associated array containing data from the cell
Depuis
3.6

Références $db, $query, Factory\getDbo(), ParameterType\INTEGER, et ParameterType\STRING.

◆ 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 $name, JPATH_ROOT, File\move(), et Text\sprintf().

◆ 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, Log\add(), extension, Factory\getApplication(), Symfony\Component\Console\Command\release(), Text\sprintf(), et Log\WARNING.

◆ removeFiles()

removeFiles ( )

Remove the files and folders in the given array from

Renvoie
void
Depuis
3.6

Références $folder, File\delete(), Folder\delete(), Folder\exists(), JPATH_ROOT, et Text\sprintf().

◆ 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, $this, $type, $value, elseif, Factory\getDbo(), et ParameterType\INTEGER.

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 :