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
afterLoginFormSubmit() : null
null
beforeDeactivate()
beforeLogin()
checkActive(\Plugin $pluginModel) : void
configIsNewVersion() : boolean
Assumes $this->config is set.
boolean
createNewUser() : void
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.
getOnePass() : string|null
string|null
getPassword() : string|null
string|null
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
getUserName() : string|null
string|null
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()
newLoginForm()
newUserSession()
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.
remoteControlLogin() : null
null
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
setAuthFailure(integer $code = self::ERROR_UNKNOWN_IDENTITY, string $message = '') : \LimeSurvey\PluginManager\AuthPluginBase
integer
Any of the constants defined in this class
string
An optional message to return about the failure
\LimeSurvey\PluginManager\AuthPluginBase
setAuthPlugin() : \LimeSurvey\PluginManager\AuthPluginBase
setAuthSuccess(\User $user) : \LimeSurvey\PluginManager\AuthPluginBase
setEvent(\LimeSurvey\PluginManager\PluginEvent $event) : \LimeSurvey\PluginManager\PluginBase
setLocaleComponent() : void
setOnePass(string $onepass) : \Authdb
setPassword(string $password) : \LimeSurvey\PluginManager\AuthPluginBase
setUsername(string $username) : \LimeSurvey\PluginManager\AuthPluginBase
showConfigErrorNotification() : void
subscribe(string $event, string $function = null)
string
string
unsubscribe(string $event)
string
ERROR_NONE
ERROR_NOT_ADDED
ERROR_USERNAME_INVALID
ERROR_PASSWORD_INVALID
ERROR_AUTH_METHOD_INVALID
ERROR_IP_LOCKED_OUT
ERROR_UNKNOWN_HANDLER
ERROR_UNKNOWN_IDENTITY
ERROR_INVALID_EMAIL
ERROR_ALREADY_EXISTING_USER
ERROR_LDAP_CONNECTION
ERROR_LDAP_MODE
ERROR_LDAP_NO_EMAIL
ERROR_LDAP_NO_FULLNAME
ERROR_LDAP_NO_BIND
ERROR_LDAP_NO_SEARCH_RESULT
LDAP_INVALID_PASSWORD_TEXT
storage :
_onepass :
description :
name :
_username :
_password :
api : \LimeSurvey\PluginManager\LimesurveyApi
event : \LimeSurvey\PluginManager\PluginEvent
id :
store :
settings :
pluginManager : \LimeSurvey\PluginManager\PluginManager
config : \LimeSurvey\PluginManager\StdObject
var |
---|
\LimeSurvey\PluginManager\StdObject