-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #340 from joomla/update
Add docu for new update event
- Loading branch information
Showing
7 changed files
with
169 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
docs/building-extensions/plugins/plugin-events/installer.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
--- | ||
sidebar_position: 1 | ||
title: Installer Events | ||
toc_max_heading_level: 2 | ||
--- | ||
|
||
Installer Events | ||
================ | ||
|
||
|
||
Installer plugin events are triggered when some routines are performed during the install process of extensions or when their update sites are downloaded. | ||
|
||
## onInstallerBeforePackageDownload | ||
|
||
### Description | ||
|
||
This event will be executed before an installable package (zip file) of an extension (package, component, module, plugin, template, library) is downloaded. It allows plugins to modify the url or headers for the request. | ||
|
||
|
||
### Event Arguments | ||
|
||
The event class `\Joomla\CMS\Event\Installer\BeforePackageDownloadEvent` has the following arguments: | ||
|
||
|
||
- **`url`** - The url of the package. | ||
|
||
- **`headers`** - The headers which are sent with the request. | ||
|
||
### Return Value | ||
|
||
None. | ||
|
||
### Examples | ||
|
||
```php | ||
public function onInstallerBeforePackageDownload(\Joomla\CMS\Event\Installer\BeforePackageDownloadEvent $event): void | ||
{ | ||
$event->updateUrl($event->getUrl() . '?auth=foo'); | ||
} | ||
``` | ||
|
||
## onInstallerBeforeUpdateSiteDownload | ||
|
||
### Description | ||
|
||
This event will be executed before an update site is downloaded. It allows to modify the url or headers for the request. | ||
|
||
### Event Arguments | ||
|
||
The event class `\Joomla\CMS\Event\Installer\BeforeUpdateSiteDownloadEvent` has the following arguments: | ||
|
||
|
||
- **`url`** - The url of the update site. | ||
|
||
- **`headers`** - The headers which are sent with the request. | ||
|
||
### Return Value | ||
|
||
None. | ||
|
||
### Examples | ||
|
||
```php | ||
public function onInstallerBeforeUpdateSiteDownload(\Joomla\CMS\Event\Installer\BeforeUpdateSiteDownloadEvent $event): void | ||
{ | ||
$event->updateUrl($event->getUrl() . '?auth=foo'); | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
versioned_docs/version-4.4/building-extensions/plugins/plugin-events/installer.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
sidebar_position: 1 | ||
title: Installer Events | ||
toc_max_heading_level: 2 | ||
--- | ||
|
||
Installer Events | ||
================ | ||
|
||
|
||
Installer plugin events are triggered when some routines are performed during the install process of extensions or when their update sites are downloaded. | ||
|
||
## onInstallerBeforePackageDownload | ||
|
||
### Description | ||
|
||
This event will be executed before an installable package (zip file) of an extension (package, component, module, plugin, template, library) is downloaded. It allows plugins to modify the url or headers for the request. | ||
|
||
|
||
### Event Arguments | ||
|
||
The event class `\Joomla\CMS\Event\Installer\BeforePackageDownloadEvent` has the following arguments: | ||
|
||
|
||
- **`url`** - The url of the package. | ||
|
||
- **`headers`** - The headers which are sent with the request. | ||
|
||
### Return Value | ||
|
||
None. | ||
|
||
### Examples | ||
|
||
```php | ||
public function onInstallerBeforePackageDownload(\Joomla\CMS\Event\Installer\BeforePackageDownloadEvent $event): void | ||
{ | ||
$event->updateUrl($event->getUrl() . '?auth=foo'); | ||
} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
versioned_docs/version-5.2/building-extensions/plugins/plugin-events/installer.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
sidebar_position: 1 | ||
title: Installer Events | ||
toc_max_heading_level: 2 | ||
--- | ||
|
||
Installer Events | ||
================ | ||
|
||
|
||
Installer plugin events are triggered when some routines are performed during the install process of extensions or when their update sites are downloaded. | ||
|
||
## onInstallerBeforePackageDownload | ||
|
||
### Description | ||
|
||
This event will be executed before an installable package (zip file) of an extension (package, component, module, plugin, template, library) is downloaded. It allows plugins to modify the url or headers for the request. | ||
|
||
|
||
### Event Arguments | ||
|
||
The event class `\Joomla\CMS\Event\Installer\BeforePackageDownloadEvent` has the following arguments: | ||
|
||
|
||
- **`url`** - The url of the package. | ||
|
||
- **`headers`** - The headers which are sent with the request. | ||
|
||
### Return Value | ||
|
||
None. | ||
|
||
### Examples | ||
|
||
```php | ||
public function onInstallerBeforePackageDownload(\Joomla\CMS\Event\Installer\BeforePackageDownloadEvent $event): void | ||
{ | ||
$event->updateUrl($event->getUrl() . '?auth=foo'); | ||
} | ||
``` | ||
|