Plugin to check for extension updates after a super admin logs in.
Uses the ExtensionInstaller library.
since | 2018-10-04 |
---|---|
author | LimeSurvey GmbH |
package | Default |
__construct(\LimeSurvey\PluginManager\PluginManager $manager,integer $id)
todo | Add proper type hint in 3.0 |
---|---|
integer
The id for storage
afterSuccessfulLogin(): void
beforeControllerAction(): void
beforePluginManagerMenuRender(): void
checkActive(\Plugin $pluginModel): void
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.
composeNotification(array<mixed,string> $messages,array<mixed,string> $errors,boolean $foundSecurityVersion): void
array<mixed,string>
array<mixed,string>
boolean
configIsNewVersion(): boolean
Assumes $this->config is set.
boolean
get(string $key = null,string $model = null,integer $id = null,mixed $default = null): boolean
string
string
integer
mixed
The default value to use when not was set
boolean
getCheckUrl(): string
string
getDescription()
getDir(): string|null
Solution copied from http://stackoverflow.com/questions/18100689/php-dir-evaluated-runtime-late-binding
string|null
getEvent(): \LimeSurvey\PluginManager\PluginEvent
getId(): integer
Used by storage model to find settings specific to this plugin
integer
getName(): string
string
Plugin name, max length: 20.
getPluginSettings(boolean $getValues = true): array
This does not include enable / disable; a disabled plugin is never loaded.
boolean
Set to false to not get the current value for each plugin setting.
array
getStore(): \LimeSurvey\PluginManager\iPluginStorage
gT(string $sToTranslate,string $sEscapeMode = 'html',string $sLanguage = null): string
string
The message that are being translated
string
string
string
init(): void
log(string $message,string $level = \CLogger::LEVEL_TRACE): void
string
string
From CLogger, defaults to CLogger::LEVEL_TRACE
publish( $fileName): string
string
readConfigFile(): boolean
todo | Could this be moved to plugin model? |
---|---|
boolean
registerCss(string $relativePathToCss,string $parentPlugin = null): void
string
string
registerMyScript(): void
registerScript(string $relativePathToScript,string $parentPlugin = null): void
string
string
registerSetting(string $name,array $options = array('type' => 'string'))
string
Name of the setting. The type of the setting is either a basic type or choice. The choice type is either a single or a multiple choice setting.
array
Contains parameters for the setting. The 'type' key contains the parameter type. The type is one of: string, int, float, choice. Supported keys per type: String: max-length(int), min-length(int), regex(string). Int: max(int), min(int). Float: max(float), min(float). Choice: choices(array containing values as keys and names as values), multiple(bool) Note that the values for choice will be translated.
renderPartial(string $viewfile,array $data,boolean $return = false,boolean $processOutput = false): \LimeSurvey\PluginManager\string;
string
Filename of view in views/ folder
array
boolean
boolean
\LimeSurvey\PluginManager\string;
saveNewVersion(): void
saveSettings( $settings): void
Assumes an array with valid key/value pairs is passed.
set(string $key,mixed $data,string $model = null,integer $id = null): boolean
string
mixed
string
integer
boolean
setEvent(\LimeSurvey\PluginManager\PluginEvent $event): \LimeSurvey\PluginManager\PluginBase
setLocaleComponent(): void
showConfigErrorNotification(): void
spitOutUrl(): void
subscribe(string $event,string $function = null)
string
string
unsubscribe(string $event)
string
storage :string
var |
---|
string
allowedPublicMethods :array<mixed,string>|null
Else method must be in the list. Used in public controller :
var |
---|
array<mixed,string>|null
api :\LimeSurvey\PluginManager\LimesurveyApi
event :\LimeSurvey\PluginManager\PluginEvent
id :integer
var |
---|
integer
description :string
var |
---|
string
name :string
var |
---|
string
store :\LimeSurvey\PluginManager\?
var |
---|
\LimeSurvey\PluginManager\?
settings :array<mixed,array>
var |
---|
array<mixed,array>
pluginManager :\LimeSurvey\PluginManager\PluginManager
config :\SimpleXMLElement|null
todo | Use ExtensionConfig |
---|---|
var |
\SimpleXMLElement|null
encryptedSettings :array<mixed,string>
var |
---|
array<mixed,string>