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 | ||
return | boolean |
protected function init() { $this->title = Piwik::translate('CoreAdminHome_UpdateSettings'); $isWritable = Piwik::hasUserSuperUserAccess() && CoreAdminController::isGeneralSettingsAdminEnabled(); $this->releaseChannel = $this->createReleaseChannel(); $this->releaseChannel->setIsWritableByCurrentUser($isWritable); $isWritable = $isWritable && PluginUpdateCommunication::canBeEnabled(); $this->sendPluginUpdateEmail = $this->createSendPluginUpdateEmail(); $this->sendPluginUpdateEmail->setIsWritableByCurrentUser($isWritable); }