InstallerScriptTrait

package

Joomla CMS

Methods

addDashboardMenuModule

Creates the dashboard menu module

addDashboardMenuModule( dashboard,  preset) : 
throws

Exception

since

6.0.0

Arguments

dashboard

stringThe name of the dashboard

preset

stringThe name of the menu preset

Response

void

checkCompatibility

Check if the extension passes the minimum requirements to be installed

checkCompatibility( type, \Joomla\CMS\Installer\InstallerAdapter adapter) : 
since

6.0.0

Arguments

type

string

adapter

InstallerAdapter

Response

boolTrue on success

checkDowngrade

Check if the extension is allowed to be downgraded

checkDowngrade( type, \Joomla\CMS\Installer\InstallerAdapter adapter) : 
since

6.0.0

Arguments

type

string

adapter

InstallerAdapter

Response

boolFalse when downgrade not allowed and new version is lower than old version otherwise true

getApplication

Returns the internal application or null when not set.

getApplication() : \Joomla\CMS\Application\CMSApplicationInterface|null
since

6.0.0

Response

CMSApplicationInterface|null

getOldManifest

Returns the manifest file if it exists or null

getOldManifest(\Joomla\CMS\Installer\InstallerAdapter adapter) : \Joomla\CMS\Installer\SimpleXMLElement|null
since

6.0.0

Arguments

adapter

InstallerAdapter

Response

SimpleXMLElement|null

install

Function called after the extension is installed.

install(\Joomla\CMS\Installer\InstallerAdapter adapter) : 
since

6.0.0

Arguments

adapter

InstallerAdapterThe adapter calling this method

Response

boolTrue on success

postflight

Function called after extension installation/update/removal procedure commences.

postflight( type, \Joomla\CMS\Installer\InstallerAdapter adapter) : 
since

6.0.0

Arguments

type

stringThe type of change (install or discover_install, update, uninstall)

adapter

InstallerAdapterThe adapter calling this method

Response

boolTrue on success

preflight

Function called before extension installation/update/removal procedure commences.

preflight( type, \Joomla\CMS\Installer\InstallerAdapter adapter) : 
since

6.0.0

Arguments

type

stringThe type of change (install or discover_install, update, uninstall)

adapter

InstallerAdapterThe adapter calling this method

Response

boolTrue on success

removeFiles

Remove the files and folders in the given array from

removeFiles() : 
since

6.0.0

Response

void

setApplication

Sets the application to use.

setApplication(\Joomla\CMS\Application\CMSApplicationInterface application) : 
since

6.0.0

Arguments

application

CMSApplicationInterfaceThe application

Response

void

uninstall

Function called after the extension is uninstalled.

uninstall(\Joomla\CMS\Installer\InstallerAdapter adapter) : 
since

6.0.0

Arguments

adapter

InstallerAdapterThe adapter calling this method

Response

boolTrue on success

update

Function called after the extension is updated.

update(\Joomla\CMS\Installer\InstallerAdapter adapter) : 
since

6.0.0

Arguments

adapter

InstallerAdapterThe adapter calling this method

Response

boolTrue on success

Properties

extension

The extension name. This should be set in the installer script.

since

6.0.0

Type(s)

string

minimumPhp

Minimum PHP version required to install the extension

since

6.0.0

Type(s)

string

minimumJoomla

Minimum Joomla! version required to install the extension

since

6.0.0

Type(s)

string

allowDowngrades

Allow downgrades of your extension

Use at your own risk as if there is a change in functionality people may wish to downgrade.

since

6.0.0

Type(s)

bool

deleteFiles

A list of files to be deleted

since

6.0.0

Type(s)

array<string|int, mixed>

deleteFolders

A list of folders to be deleted

since

6.0.0

Type(s)

array<string|int, mixed>

application

The application object

since

6.0.0

Type(s)

CMSApplicationInterface