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
beforeLogin()
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
getAuthMethodName(): 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
getGlobalBasePermissions(): void
getId(): integer
Used by storage model to find settings specific to this plugin
integer
getName(): string
string
Plugin name, max length: 20.
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()
log(string $message,string $level = \CLogger::LEVEL_TRACE): void
string
string
From CLogger, defaults to CLogger::LEVEL_TRACE
newUserSession()
publish( $fileName): string
string
readConfigFile(): boolean
todo | Could this be moved to plugin model? |
---|---|
boolean
registerCss(string $relativePathToCss,string $parentPlugin = null): void
string
string
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.
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( $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
setAuthFailure(integer $code = self::ERROR_UNKNOWN_IDENTITY,string $message = '',\LimeSurvey\PluginManager\PluginEvent $event = null): \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\PluginEvent $event = null): \LimeSurvey\PluginManager\AuthPluginBase
setAuthSuccess(\User $user,\LimeSurvey\PluginManager\PluginEvent $event = null): \LimeSurvey\PluginManager\AuthPluginBase
setEvent(\LimeSurvey\PluginManager\PluginEvent $event): \LimeSurvey\PluginManager\PluginBase
setLocaleComponent(): void
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 :string
var |
---|
string
description :string
var |
---|
string
name :string
var |
---|
string
allowedPublicMethods :array<mixed,string>|null
Else method must be in the list. Used in public controller :
var |
---|
array<mixed,string>|null
settings :array<mixed,array>
var |
---|
array<mixed,array>
_username :
_password :
api :\LimeSurvey\PluginManager\LimesurveyApi
event :\LimeSurvey\PluginManager\PluginEvent
id :integer
var |
---|
integer
store :\LimeSurvey\PluginManager\?
var |
---|
\LimeSurvey\PluginManager\?
pluginManager :\LimeSurvey\PluginManager\PluginManager
config :\SimpleXMLElement|null
todo | Use ExtensionConfig |
---|---|
var |
\SimpleXMLElement|null
encryptedSettings :array<mixed,string>
var |
---|
array<mixed,string>