Back to Joomla project (class list)

Class InstallerScript - list of methods

Base install script for use by extensions providing helper methods for common behaviours.
Package: Joomla\CMS\Installer
Copyright: (C) 2016 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Installer/InstallerScript.php
Project: Joomla

Method Summary

public bool
(mixed $type, mixed $parent)

Function called before extension installation/update/removal procedure commences
Parameters
  • string $type The type of change (install, update or discover_install, not uninstall)
  • \Joomla\CMS\Installer\InstallerAdapter $parent The class calling this method
Returns
  • bool True on success
Since
  • 3.6
Show source code of this method: preflight Source Code

public array
(mixed $isModule)

Gets each instance of a module in the #__modules table
Parameters
  • bool $isModule True if the extension is a module as this can have multiple instances
Returns
  • array An array of ID's of the extension
Since
  • 3.6
Show source code of this method: getInstances Source Code

public string
(mixed $name, mixed $id = 0)

Gets parameter value in the extensions row of the extension table
Parameters
  • string $name The name of the parameter to be retrieved
  • int $id The id of the item in the Param Table
Returns
  • string The parameter desired
Since
  • 3.6
Show source code of this method: getParam Source Code

public bool
(mixed $paramArray = null, mixed $type = 'edit', mixed $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
Parameters
  • array $paramArray The array of parameters to be added/edited/removed
  • string $type The type of change to be made to the param (edit/remove)
  • int $id The id of the item in the relevant table
Returns
  • bool True on success
Since
  • 3.6
Show source code of this method: setParams Source Code

public array
(mixed $element, mixed $table, mixed $column, mixed $identifier)

Builds a standard select query to produce better DRY code in this script.
Parameters
  • string $element The element to get from the query
  • string $table The table to search for the data in
  • string $column The column of the database to search from
  • mixed $identifier The integer id or the string
Returns
  • array Associated array containing data from the cell
Since
  • 3.6
Show source code of this method: getItemArray Source Code

public void
()

Remove the files and folders in the given array from
Returns
  • void
Since
  • 3.6
Show source code of this method: removeFiles Source Code

public void
()

Moves the CLI scripts into the CLI folder in the CMS
Returns
  • void
Since
  • 3.6
Show source code of this method: moveCliFiles Source Code

public void
(string $dashboard, string $preset)

Creates the dashboard menu module
Parameters
  • string $dashboard The name of the dashboard
  • string $preset The name of the menu preset
Returns
  • void
Since
  • 4.0.0
-
  • \Exception
Show source code of this method: addDashboardMenu Source Code

Properties Summary

protected string
$release
The version number of the extension.
Since
  • 3.6
protected string
$paramTable
The table the parameters are stored in.
Since
  • 3.6
protected string
$extension
The extension name. This should be set in the installer script.
Since
  • 3.6
protected array
$deleteFiles
A list of files to be deleted
Since
  • 3.6
protected array
$deleteFolders
A list of folders to be deleted
Since
  • 3.6
protected array
$cliScriptFiles
A list of CLI script files to be copied to the cli directory
Since
  • 3.6
protected string
$minimumPhp
Minimum PHP version required to install the extension
Since
  • 3.6
protected string
$minimumJoomla
Minimum Joomla! version required to install the extension
Since
  • 3.6
protected bool
$allowDowngrades
Allow downgrades of your extension
Since
  • 3.6

Tags Summary

Since
3.6