LimeSurvey API - Master branch

iPlugin

Table of Contents

Methods

__construct()  : mixed
Should return the description for this plugin Constructor for the plugin
getDescription()  : mixed
Return the description for this plugin
getEvent()  : PluginEvent
Get the current event this plugin is responding to
getId()  : int
Get the id of this plugin (set by PluginManager on instantiation)
getName()  : string
Gets the name for the plugin, this must be unique.
getPluginSettings()  : array<string|int, mixed>
Provides meta data on the plugin settings that are available for this plugin.
getStore()  : iPluginStorage
Returns a reference to the storage interface for the plugin.
saveSettings()  : mixed
Saves the settings for this plugin
setEvent()  : PluginBase
Set the event to the plugin, this method is executed by the PluginManager just before dispatching the event.

Methods

__construct()

Should return the description for this plugin Constructor for the plugin

public __construct(PluginManager $manager, int $id) : mixed
Parameters
$manager : PluginManager

The plugin manager instantiating the object

$id : int

The id for storage

getDescription()

Return the description for this plugin

public static getDescription() : mixed

getId()

Get the id of this plugin (set by PluginManager on instantiation)

public getId() : int
Return values
int

getName()

Gets the name for the plugin, this must be unique.

public static getName() : string
Return values
string

Plugin name, max length: 20.

getPluginSettings()

Provides meta data on the plugin settings that are available for this plugin.

public getPluginSettings([bool $getValues = true ]) : array<string|int, mixed>

This does not include enable / disable; a disabled plugin is never loaded.

Parameters
$getValues : bool = true

Set to false to not get the current value for each plugin setting.

Return values
array<string|int, mixed>

saveSettings()

Saves the settings for this plugin

public saveSettings(array<string, mixed> $settings) : mixed

Assumes an array with valid key/value pairs is passed.

Parameters
$settings : array<string, mixed>

An array with key/value pairs for all plugin settings

setEvent()

Set the event to the plugin, this method is executed by the PluginManager just before dispatching the event.

public setEvent(PluginEvent $event) : PluginBase
Parameters
$event : PluginEvent
Return values
PluginBase

        
On this page

Search results