CoreQuestionAttributeProvider

Extends\LimeSurvey\Models\Services\QuestionAttributeProvider

Provides question attribute definitions from question types

package

Default

Methods

Read question attributes from XML file and convert it to array

getAdvancedAttributesFromXml(string $xmlFilePath): \LimeSurvey\Models\Services\array<string,array>

Arguments

$xmlFilePath

string

Path to XML

Response

\LimeSurvey\Models\Services\array

The advanced attribute settings for this question type

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

getBaseDefinition(): \LimeSurvey\Models\Services\array<string,mixed>
inheritedstatic

Response

\LimeSurvey\Models\Services\array

Returns question attribute definitions for the specified options from one source

getDefinitions(\LimeSurvey\Models\Services\array<string,mixed> $options = array()): \LimeSurvey\Models\Services\array<string,array>
inheritedabstract

Arguments

$options

\LimeSurvey\Models\Services\array

to use

Response

\LimeSurvey\Models\Services\array

array of question attribute definitions

Read question attributes from XML file and convert it to array

getGeneralAttibutesFromXml(string $xmlFilePath): \LimeSurvey\Models\Services\array<string,array>

Arguments

$xmlFilePath

string

Path to XML

Response

\LimeSurvey\Models\Services\array

The general attribute settings for this question type

Return the question attribute settings for the passed type (parameter)

getQuestionAttributes(string $questionType,boolean $advancedOnly = false): \LimeSurvey\Models\Services\array<string,array>
Throws
\CException

Arguments

$questionType

string

: type of question (this is the attribute 'question_type' in table question_theme)

$advancedOnly

boolean

If true, only fetch advanced attributes

Response

\LimeSurvey\Models\Services\array

the attribute settings for this question type returns values from getGeneralAttributesFromXml and getAdvancedAttributesFromXml if this fails getAttributesDefinition and getDefaultSettings are returned

Extracts the question type from the $options.

getQuestionType(\LimeSurvey\Models\Services\array<string,mixed> $options): 
inheritedstatic

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

Arguments

$options

\LimeSurvey\Models\Services\array

Response