PHP Class Piwik\Plugins\Marketplace\UpdateCommunication

Afficher le fichier Open project: piwik/piwik Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( SystemSettings $settings )
canBeEnabled ( ) : boolean Checks whether a plugin update notification can be enabled or not. It cannot be enabled if for instance the Marketplace is disabled or if update notifications are disabled in general.
isEnabled ( ) : boolean Checks whether plugin update notification is enabled or not. If the marketplace is disabled or if update communication is disabled in general, it will return false as well.
sendNotificationIfUpdatesAvailable ( ) : boolean Sends an email to all super users if there is an update available for any plugins from the Marketplace.

Méthodes protégées

Méthode Description
buildNotificationMessage ( $pluginsToBeNotified, $hasThemeUpdate, $hasPluginUpdate )
getLatestVersion ( $plugin )
getLatestVersionSent ( $plugin )
getNotificationSentOptionName ( $plugin )
getPluginsHavingUpdate ( )
hasNotificationAlreadyReceived ( $plugin )
sendEmailNotification ( $subject, $message ) Send an email notification to all super users.
sendNotifications ( $pluginsToBeNotified )
setHasLatestUpdateNotificationReceived ( $plugin )

Method Details

__construct() public méthode

public __construct ( SystemSettings $settings )
$settings Piwik\Plugins\CoreUpdater\SystemSettings

buildNotificationMessage() protected méthode

protected buildNotificationMessage ( $pluginsToBeNotified, $hasThemeUpdate, $hasPluginUpdate )

canBeEnabled() public static méthode

Checks whether a plugin update notification can be enabled or not. It cannot be enabled if for instance the Marketplace is disabled or if update notifications are disabled in general.
public static canBeEnabled ( ) : boolean
Résultat boolean

getLatestVersion() protected méthode

protected getLatestVersion ( $plugin )

getLatestVersionSent() protected méthode

protected getLatestVersionSent ( $plugin )

getNotificationSentOptionName() protected méthode

protected getNotificationSentOptionName ( $plugin )

getPluginsHavingUpdate() protected méthode

protected getPluginsHavingUpdate ( )

hasNotificationAlreadyReceived() protected méthode

protected hasNotificationAlreadyReceived ( $plugin )

isEnabled() public méthode

Checks whether plugin update notification is enabled or not. If the marketplace is disabled or if update communication is disabled in general, it will return false as well.
public isEnabled ( ) : boolean
Résultat boolean

sendEmailNotification() protected méthode

Send an email notification to all super users.
protected sendEmailNotification ( $subject, $message )
$subject
$message

sendNotificationIfUpdatesAvailable() public méthode

For each update we send an email only once.

sendNotifications() protected méthode

protected sendNotifications ( $pluginsToBeNotified )

setHasLatestUpdateNotificationReceived() protected méthode