Base class for plugins.
package |
Default |
---|
__construct(\LimeSurvey\PluginManager\PluginManager $manager, integer $id)
todo |
Add proper type hint in 3.0 |
---|---|
integer
The id for storage
checkActive(\Plugin $pluginModel) : void
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
getDescription()
getDir() : string
Solution copied from http://stackoverflow.com/questions/18100689/php-dir-evaluated-runtime-late-binding
string
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()
listExportOptions()
listExportPlugins()
log(string $message, string $level = \CLogger::LEVEL_TRACE) : void
string
string
From CLogger, defaults to CLogger::LEVEL_TRACE
newExport()
publish( $fileName) : string
string
readConfigFile() : void
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(\LimeSurvey\PluginManager\type $settings)
Assumes an array with valid key/value pairs is passed.
\LimeSurvey\PluginManager\type
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
subscribe(string $event, string $function = null)
string
string
unsubscribe(string $event)
string
storage :
description :
name :
settings :
api : \LimeSurvey\PluginManager\LimesurveyApi
event : \LimeSurvey\PluginManager\PluginEvent
id :
store :
pluginManager : \LimeSurvey\PluginManager\PluginManager
config : \LimeSurvey\PluginManager\StdObject
var |
---|
\LimeSurvey\PluginManager\StdObject