PHP Класс Piwik\Plugins\Marketplace\UpdateCommunication

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
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 )

Описание методов

__construct() публичный Метод

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

buildNotificationMessage() защищенный Метод

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

canBeEnabled() публичный статический Метод

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
Результат boolean

getLatestVersion() защищенный Метод

protected getLatestVersion ( $plugin )

getLatestVersionSent() защищенный Метод

protected getLatestVersionSent ( $plugin )

getNotificationSentOptionName() защищенный Метод

protected getNotificationSentOptionName ( $plugin )

getPluginsHavingUpdate() защищенный Метод

protected getPluginsHavingUpdate ( )

hasNotificationAlreadyReceived() защищенный Метод

protected hasNotificationAlreadyReceived ( $plugin )

isEnabled() публичный Метод

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
Результат boolean

sendEmailNotification() защищенный Метод

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

sendNotificationIfUpdatesAvailable() публичный Метод

For each update we send an email only once.
public sendNotificationIfUpdatesAvailable ( ) : boolean
Результат boolean

sendNotifications() защищенный Метод

protected sendNotifications ( $pluginsToBeNotified )

setHasLatestUpdateNotificationReceived() защищенный Метод