ThemeQuestionAttributeProvider
extends QuestionAttributeProvider
in package
Provides question attribute definitions from question themes
Table of Contents
Methods
- getDefinitions() : array<string, array<string|int, mixed>>
- Returns question attribute definitions for the specified options from one source
- getAttributesFromQuestionTheme() : array<string, array<string|int, mixed>>
- Gets the additional attributes for an extended theme from xml file.
- 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.
- getQuestionTheme() : mixed
- Extracts the question theme 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
Return values
array<string, array<string|int, mixed>> —array of question attribute definitions
getAttributesFromQuestionTheme()
Gets the additional attributes for an extended theme from xml file.
protected
getAttributesFromQuestionTheme(string $questionThemeName, string $questionType) : array<string, array<string|int, mixed>>
If there are no attributes, an empty array is returned
Parameters
- $questionThemeName : string
-
the question theme name (see table question theme "name")
- $questionType : string
-
the extended typ (see table question_themes "extends")
Return values
array<string, array<string|int, mixed>> —additional attributes for an extended theme or empty array
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>
getQuestionTheme()
Extracts the question theme from the $options.
private
static getQuestionTheme(array<string, mixed> $options) : mixed
If it's not explicitly set, it tries to use a question object.
Parameters
- $options : array<string, mixed>