LimeSurvey API - Master branch

PluginQuestionAttributeProvider extends QuestionAttributeProvider
in package

Provides question attribute definitions from plugins

Table of Contents

Methods

getDefinitions()  : array<string, array<string|int, mixed>>
Returns question attribute definitions for the specified options from one source
getAttributesFromPlugin()  : array<string, array<string|int, mixed>>
Returns the question attributes added by plugins ('newQuestionAttributes' event) for the specified question type.
getBaseDefinition()  : array<string, mixed>
Get default settings for an attribute, return an array of string|null
getQuestionType()  : mixed
Extracts the question type from the $options.

Methods

getDefinitions()

Returns question attribute definitions for the specified options from one source

public getDefinitions([mixed $options = [] ]) : array<string, array<string|int, mixed>>
Parameters
$options : mixed = []

to use

Tags
inheritdoc
Return values
array<string, array<string|int, mixed>>

array of question attribute definitions

getAttributesFromPlugin()

Returns the question attributes added by plugins ('newQuestionAttributes' event) for the specified question type.

protected getAttributesFromPlugin(string $questionType) : array<string, array<string|int, mixed>>
Parameters
$questionType : string

the question type to retrieve the attributes for.

Return values
array<string, array<string|int, mixed>>

the question attributes added by plugins

getBaseDefinition()

Get default settings for an attribute, return an array of string|null

protected static getBaseDefinition() : array<string, mixed>
Return values
array<string, mixed>

getQuestionType()

Extracts the question type from the $options.

protected static getQuestionType(array<string, mixed> $options) : mixed

If it's not explicitly set, it tries to use a question object.

Parameters
$options : array<string, mixed>

        
On this page

Search results