iQuestion

Extends

Methods

__construct

__construct(\ls\pluginmanager\iPlugin $plugin, \ls\pluginmanager\LimesurveyApi $api, integer $questionId = null, integer $responseId = null) : void

Arguments

$questionId

integer

$responseId

integer

Function that returns meta data for the available attributes for the question type.

getAttributes($language = null) 

Arguments

$language

Returns the number of question this question contains.

getCount() : int

Defaults to 1, can be set to 0 if this question should not be counted like in case for display only or equation questions.

Response

int

This function derives a unique identifier for identifying a question type.

getGUID() : string
static

Response

string

Returns the variables exposed by this question.

getVariables() : array

The returned array contains a key for each variable name and the value is an array with meta data.

Response

array

render

render($name, $language, bool $return = false) 

Arguments

$name

$language

$return

bool

If true, return the content instead of outputting it.

This function must save the custom question attributes for a question.

saveAttributes(array $attributes, $qid = null) : boolean

The default implementation just iterates over the array and saves each property.

Arguments

$attributes

array

A array containing the value for each attribute filled in.

$qid

Response

boolean

True on success, false on failure(s).