PackageAdapter
Extends InstallerAdapterPackage installer
| since |
3.1 |
|---|---|
| package |
Joomla CMS |
Methods
__construct
Constructor
__construct(\Joomla\CMS\Installer\Installer parent, \JDatabaseDriver db, array options = array()) : mixed
| since |
3.4 |
|---|
Arguments
- parent
\Joomla\CMS\Installer\InstallerParent object- db
\JDatabaseDriverDatabase object- options
arrayConfiguration Options
Response
mixed
_getExtensionId
Gets the extension id.
_getExtensionId(string type, string id, int client, string group) : int
| since |
3.1 |
|---|
Arguments
- type
stringThe extension type.- id
stringThe name of the extension (the element field).- client
intThe application id (0: Joomla CMS site; 1: Joomla CMS administrator).- group
stringThe extension group (mainly for plugins).
Response
int
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
intThe 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_install
Generic discover_install method for extensions
discover_install() : bool
| since |
3.4 |
|---|
Response
boolTrue on success
doDatabaseTransactions
Method to handle database transactions for the installer
doDatabaseTransactions() : bool
| since |
3.4 |
|---|---|
| throws |
|
Response
boolTrue on success
doLoadLanguage
Load language files
doLoadLanguage(string extension, string source, string base = JPATH_ADMINISTRATOR) : void
| since |
3.4 |
|---|
Arguments
- extension
stringThe name of the extension- source
stringPath to the extension- base
stringBase path for the extension language
finaliseInstall
Method to finalise the installation processing
finaliseInstall() : void
| since |
3.4 |
|---|---|
| throws |
|
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
stringOptional element name to be converted
Response
stringThe filtered element
getManifest
Get the manifest object.
getManifest() : \SimpleXMLElement
| since |
3.4 |
|---|
Response
\SimpleXMLElementManifest object
getName
Get the filtered component name from the manifest
getName() : string
| since |
3.4 |
|---|
Response
stringThe filtered name
getParent
getParent() : \Joomla\CMS\Installer\Installer
Retrieves the parent object.
Response
\Joomla\CMS\Installer\Installer
getRoute
Get the install route being followed
getRoute() : string
| since |
3.4 |
|---|
Response
stringThe install route
getScriptClassName
Get the class name for the install adapter script.
getScriptClassName() : string
| since |
3.4 |
|---|
Response
stringThe class name.
install
Generic install method for extensions
install() : bool|int
| since |
3.4 |
|---|
Response
bool|intThe extension ID on success, boolean false on failure
loadLanguage
Load language from a path
loadLanguage(string path) : void
| since |
3.1 |
|---|
Arguments
- path
stringThe path of the language.
onExtensionAfterInstall
Handler for the onExtensionAfterInstall event
onExtensionAfterInstall(\Joomla\CMS\Installer\Installer installer, int|bool eid) : void
| since |
3.7.0 |
|---|
Arguments
- installer
\Joomla\CMS\Installer\InstallerInstaller instance managing the extension's installation- eid
int|boolThe extension ID of the installed extension on success, boolean false on install failure
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
boolResult of operation, true if updated, false on failure
setManifest
Set the manifest object.
setManifest(object manifest) : \Joomla\CMS\Installer\InstallerAdapter
| since |
3.4 |
|---|
Arguments
- manifest
objectThe manifest object
Response
\Joomla\CMS\Installer\InstallerAdapterInstance 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
stringThe install route being followed
Response
\Joomla\CMS\Installer\InstallerAdapterInstance 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 |
|---|
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
stringThe install method to execute
Response
boolTrue on success
uninstall
Custom uninstall method
uninstall(int id) : bool
| since |
3.1 |
|---|
Arguments
- id
intThe id of the package to uninstall.
Response
boolTrue on success
update
Generic update method for extensions
update() : bool|int
| since |
3.4 |
|---|
Response
bool|intThe extension ID on success, boolean false on failure
Properties
eventRegistered
Flag if the internal event callback has been registered
| since |
3.7.0 |
|---|
Type(s)
bool
installedIds
An array of extension IDs for each installed extension
| since |
3.7.0 |
|---|
Type(s)
array
results
The results of each installed extensions
| since |
3.1 |
|---|
Type(s)
array
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
currentExtensionId
ID for the currently installed extension if present
| since |
3.4 |
|---|
Type(s)
int
element
The unique identifier for the extension (e.g. mod_login)
| since |
3.4 |
|---|
Type(s)
string
extension
Extension object.
| since |
3.4 |
|---|
Type(s)
\Joomla\CMS\Table\Extension
extensionMessage
Messages rendered by custom scripts
| since |
3.4 |
|---|
Type(s)
string
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)
string
manifest_script
A path to the PHP file that the scriptfile declaration in the manifest refers to.
| since |
3.4 |
|---|
Type(s)
string
name
Name of the extension
| since |
3.4 |
|---|
Type(s)
string
route
Install function routing
| since |
3.4 |
|---|
Type(s)
string
type
The type of adapter in use
| since |
3.4 |
|---|
Type(s)
string
parent
Parent object
Type(s)
\Joomla\CMS\Installer\Installer