Difference between revisions of "Extension Installer/Writing a new installer adapter"

From Joomla! Documentation

< Extension Installer
m (categories added)
(4 intermediate revisions by one other user not shown)
Line 2: Line 2:
  
 
Installer Adapters have four primary tasks:
 
Installer Adapters have four primary tasks:
* '''Install''' - Installs a new extension
+
* '''Install''' - Installs a new extension (returns an extension ID on sucess or false on failure. Zero is a valid extension ID)
* '''Upgrade''' - Performs upgrade tasks for an extension
+
* '''Update''' - Performs update tasks for an extension (returns an extension ID on sucess or false on failure. Zero is a valid extension ID)
* '''Uninstall''' - Removes an extension
+
* '''Uninstall''' - Removes an extension (accepts extension ID; returns the boolean result of the uninstallation)
* '''Discover''' - Discovers an extension
+
* '''Discover''' - Discovers an extension (returns an array of extensions)
* '''Discover Install''' - Handles the installation of a discovered extension
+
* '''Discover Install''' - Handles the installation of a discovered extension (returns an extension ID on sucess or false on failure. Zero is a valid extension ID)
 +
* '''Refresh Manifest Cache''' - Handles refreshing the extension's table manifest cache
  
 
Discover is a special operation that is designed to 'look' for new extensions to install. For example, a user might copy a component to the relevant folders but not have run the installer so the component won't appear in the installed extensions list. The 'Discover' function would find this extension and provide the user the ability to install it from its location. A discover install is used on discovered extensions to add the relevant details to the database and run database scripts.
 
Discover is a special operation that is designed to 'look' for new extensions to install. For example, a user might copy a component to the relevant folders but not have run the installer so the component won't appear in the installed extensions list. The 'Discover' function would find this extension and provide the user the ability to install it from its location. A discover install is used on discovered extensions to add the relevant details to the database and run database scripts.
 +
 +
Install, Update, Discover Install and Refresh Manifest Cache operations should all refer to the parent JInstaller for details, such as the manifest (install/update) or the extension (discover install, refresh manifest cache).
 +
[[Category:Template Development]]
 +
[[Category:Module Development]]
 +
[[Category:Plugin Development]]
 +
[[Category:Language Development]]
 +
[[Category:Component Development]]

Revision as of 07:10, 19 October 2012

Joomla! uses installer adapters to allow it to install different extension types with ease. This means that pluggable installation systems are possible. You can write an installer adapter and include it into your own project or provide an installer adapter in the central location to enable it to be utilised by the normal installer.

Installer Adapters have four primary tasks:

  • Install - Installs a new extension (returns an extension ID on sucess or false on failure. Zero is a valid extension ID)
  • Update - Performs update tasks for an extension (returns an extension ID on sucess or false on failure. Zero is a valid extension ID)
  • Uninstall - Removes an extension (accepts extension ID; returns the boolean result of the uninstallation)
  • Discover - Discovers an extension (returns an array of extensions)
  • Discover Install - Handles the installation of a discovered extension (returns an extension ID on sucess or false on failure. Zero is a valid extension ID)
  • Refresh Manifest Cache - Handles refreshing the extension's table manifest cache

Discover is a special operation that is designed to 'look' for new extensions to install. For example, a user might copy a component to the relevant folders but not have run the installer so the component won't appear in the installed extensions list. The 'Discover' function would find this extension and provide the user the ability to install it from its location. A discover install is used on discovered extensions to add the relevant details to the database and run database scripts.

Install, Update, Discover Install and Refresh Manifest Cache operations should all refer to the parent JInstaller for details, such as the manifest (install/update) or the extension (discover install, refresh manifest cache).