PluginAdapter
Extends InstallerAdapterPlugin installer
since |
3.1 |
---|---|
package |
Joomla CMS |
Methods
__construct
Constructor
__construct(\Joomla\CMS\Installer\Installer parent, \Joomla\Database\DatabaseDriver db, array options = array()) : mixed
since |
3.4 |
---|
Arguments
- parent
\Joomla\CMS\Installer\Installer
Parent object- db
\Joomla\Database\DatabaseDriver
Database object- options
array
Configuration Options
Response
mixed
__get
Proxy for db variable.
__get(string name) : mixed
since |
4.2.0 |
---|---|
deprecated |
5.0 Use getDatabase() instead of directly accessing db |
Arguments
- name
string
The name of the element
Response
mixed
The value of the element if set, null otherwise
canUninstallPackageChild
Check if a package extension allows its child extensions to be uninstalled individually
canUninstallPackageChild(int packageId) : bool
since |
3.7.0 |
---|---|
note |
This method defaults to true to emulate the behavior of 3.6 and earlier which did not support this lookup |
Arguments
- packageId
int
The extension ID of the package to check
Response
bool
checkExistingExtension
Method to check if the extension is already present in the database
checkExistingExtension() : void
since |
3.4 |
---|---|
throws |
|
checkExtensionInFilesystem
Method to check if the extension is present in the filesystem, flags the route as update if so
checkExtensionInFilesystem() : void
since |
3.4 |
---|---|
throws |
|
copyBaseFiles
Method to copy the extension's base files from the <files>
tag(s) and the manifest file
copyBaseFiles() : void
since |
3.4 |
---|---|
throws |
|
createExtensionRoot
Method to create the extension root path if necessary
createExtensionRoot() : void
since |
3.4 |
---|---|
throws |
|
discover
Custom discover method
discover() : array
since |
3.1 |
---|
Response
array
Extension) list of extensions available
discover_install
Generic discover_install method for extensions
discover_install() : bool
since |
3.4 |
---|
Response
bool
True on success
doDatabaseTransactions
Method to handle database transactions for the installer
doDatabaseTransactions() : bool
since |
3.4 |
---|---|
throws |
|
Response
bool
True on success
doLoadLanguage
Load language files
doLoadLanguage(string extension, string source, string base = JPATH_ADMINISTRATOR) : void
since |
3.4 |
---|
Arguments
- extension
string
The name of the extension- source
string
Path to the extension- base
string
Base path for the extension language
finaliseInstall
Method to finalise the installation processing
finaliseInstall() : void
since |
4.0.0 |
---|---|
throws |
|
finaliseUninstall
Method to finalise the uninstallation processing
finaliseUninstall() : bool
since |
4.0.0 |
---|---|
throws |
|
Response
bool
getDiscoverInstallSupported
Checks if the adapter supports discover_install
getDiscoverInstallSupported() : bool
since |
3.4 |
---|
Response
bool
getElement
Get the filtered extension element from the manifest
getElement(string element = null) : string
since |
3.4 |
---|
Arguments
- element
string
Optional element name to be converted
Response
string
The filtered element
getManifest
Get the manifest object.
getManifest() : \SimpleXMLElement
since |
3.4 |
---|
Response
\SimpleXMLElement
Manifest object
getName
Get the filtered component name from the manifest
getName() : string
since |
3.4 |
---|
Response
string
The filtered name
getParent
Retrieves the parent installer
getParent() : \Joomla\CMS\Installer\Installer
since |
4.0.0 |
---|
Response
\Joomla\CMS\Installer\Installer
getRoute
Get the install route being followed
getRoute() : string
since |
3.4 |
---|
Response
string
The install route
getScriptClassName
Get the class name for the install adapter script.
getScriptClassName() : string
since |
3.4 |
---|
Response
string
The class name.
install
Generic install method for extensions
install() : bool|int
since |
3.4 |
---|
Response
bool|int
The extension ID on success, boolean false on failure
loadLanguage
Custom loadLanguage method
loadLanguage(string path = null) : void
since |
3.1 |
---|
Arguments
- path
string
The path where to find language files.
parseOptionalTags
Method to parse optional tags in the manifest
parseOptionalTags() : void
since |
3.1 |
---|
parseQueries
Method to parse the queries specified in the <sql>
tags
parseQueries() : void
since |
3.4 |
---|---|
throws |
|
prepareDiscoverInstall
Prepares the adapter for a discover_install task
prepareDiscoverInstall() : void
since |
3.4 |
---|
refreshManifestCache
Refreshes the extension table cache.
refreshManifestCache() : bool
since |
3.1 |
---|
Response
bool
Result of operation, true if updated, false on failure.
removeExtensionFiles
Removes this extension's files
removeExtensionFiles() : void
since |
4.0.0 |
---|---|
throws |
|
setManifest
Set the manifest object.
setManifest(object manifest) : \Joomla\CMS\Installer\InstallerAdapter
since |
3.4 |
---|
Arguments
- manifest
object
The manifest object
Response
\Joomla\CMS\Installer\InstallerAdapter
Instance of this class to support chaining
setRoute
Set the install route being followed
setRoute(string route) : \Joomla\CMS\Installer\InstallerAdapter
since |
3.4 |
---|
Arguments
- route
string
The install route being followed
Response
\Joomla\CMS\Installer\InstallerAdapter
Instance of this class to support chaining
setupInstallPaths
Method to do any prechecks and setup the install paths for the extension
setupInstallPaths() : void
since |
3.4 |
---|
setupScriptfile
Setup the manifest script file for those adapters that use it.
setupScriptfile() : void
since |
3.4 |
---|
setupUninstall
Method to do any prechecks and setup the uninstall job
setupUninstall() : void
since |
4.0.0 |
---|
setupUpdates
Method to setup the update routine for the adapter
setupUpdates() : void
since |
3.4 |
---|
storeExtension
Method to store the extension to the database
storeExtension() : void
since |
3.4 |
---|---|
throws |
|
triggerManifestScript
Executes a custom install script method
triggerManifestScript(string method) : bool
since |
3.4 |
---|---|
throws |
|
Arguments
- method
string
The install method to execute
Response
bool
True on success
uninstall
Generic update method for extensions
uninstall(int id) : bool
since |
4.0.0 |
---|
Arguments
- id
int
The extension ID
Response
bool
True on success
update
Generic update method for extensions
update() : bool|int
since |
3.4 |
---|
Response
bool|int
The extension ID on success, boolean false on failure
Properties
currentExtensionId
ID for the currently installed extension if present
manifest
Copy of the XML manifest file.
Making this object public allows extensions to customize the manifest in custom scripts.
since |
3.4 |
---|
Type(s)
\SimpleXMLElement
manifest_script
A path to the PHP file that the scriptfile declaration in the manifest refers to.
supportsDiscoverInstall
Flag if the adapter supports discover installs
Adapters should override this and set to false if discover install is unsupported
since |
3.4 |
---|
Type(s)
bool