UpdateCheck
extends PluginBase
in package
Plugin to check for extension updates after a super admin logs in.
Uses the ExtensionInstaller library.
Tags
Table of Contents
Properties
- $allowedPublicMethods : mixed
- $storage : string
- Where to save plugin settings etc.
Methods
- afterSuccessfulLogin() : void
- After super admin log in, check date of next update check and set flag.
- beforeControllerAction() : void
- If we're in an admin controller and the flag is set, render the JavaScript that will Ajax the checkAll() URL and push a notification.
- beforePluginManagerMenuRender() : void
- checkAll() : void
- Used to check for available updates for all plugins.
- init() : void
- composeNotification() : void
- Compose messages and errors into a nice notification message. Extra annoying if $foundSecurityVersion is set to true.
- getCheckUrl() : string
- registerMyScript() : void
- spitOutUrl() : void
Properties
$allowedPublicMethods
public
mixed
$allowedPublicMethods
= array('checkAll')
Tags
$storage
Where to save plugin settings etc.
protected
string
$storage
= 'DbStorage'
Methods
afterSuccessfulLogin()
After super admin log in, check date of next update check and set flag.
public
afterSuccessfulLogin() : void
beforeControllerAction()
If we're in an admin controller and the flag is set, render the JavaScript that will Ajax the checkAll() URL and push a notification.
public
beforeControllerAction() : void
beforePluginManagerMenuRender()
public
beforePluginManagerMenuRender() : void
checkAll()
Used to check for available updates for all plugins.
public
checkAll() : void
This method should be run at super admin login, max once every day. Run by Ajax to avoid increased page load time. This method can also be run manually for testing.
init()
public
init() : void
composeNotification()
Compose messages and errors into a nice notification message. Extra annoying if $foundSecurityVersion is set to true.
protected
composeNotification(array<string|int, string> $messages, array<string|int, string> $errors, bool $foundSecurityVersion) : void
Parameters
- $messages : array<string|int, string>
- $errors : array<string|int, string>
- $foundSecurityVersion : bool
getCheckUrl()
protected
getCheckUrl() : string
Return values
stringregisterMyScript()
protected
registerMyScript() : void
spitOutUrl()
protected
spitOutUrl() : void