QuestionAttributeProvider
in package
AbstractYes
Base class for question attribute definition providers
Table of Contents
Methods
- getDefinitions() : array<string, array<string|int, mixed>>
- Returns question attribute definitions for the specified options from one source
- 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
abstract getDefinitions([array<string, mixed> $options = [] ]) : array<string, array<string|int, mixed>>
Parameters
- $options : array<string, mixed> = []
-
to use
Return values
array<string, array<string|int, mixed>> —array of question attribute definitions
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>