LimeSurvey API - Master branch

SurveyResponses
in package
implements CommandInterface Uses AuthPermissionTrait, ResponseMappingTrait

Table of Contents

Interfaces

CommandInterface

Properties

$answerCache  : SurveyAnswerCache
$permission  : Permission
$responseFactory  : ResponseFactory
$responseFilterPatcher  : FilterPatcher
$survey  : Survey
$transformerOutputSurveyResponses  : TransformerOutputSurveyResponses
$permissionModel  : Permission|null

Methods

__construct()  : mixed
Constructor
process()  : array<string|int, mixed>
run()  : Response
Run survey detail command
setPermissionModel()  : void
buildCriteria()  : array<string|int, mixed>
buildPagination()  : array<string|int, mixed>
getActualAid()  : int|null
Get the actual answer ID using the shared answer cache.
getPermissionModel()  : Permission
getQuestionFieldMap()  : array<string|int, mixed>
Get the question field map.
getSurvey()  : void
getSurveyDynamicModel()  : SurveyDynamic
getSurveyId()  : string
hasGlobalPermission()  : Response
hasSurveyPermission()  : Response
mapResponsesToQuestions()  : array<string|int, mixed>
Map survey responses to survey questions.

Properties

Methods

__construct()

Constructor

public __construct(Survey $survey, Permission $permission, FilterPatcher $responseFilterPatcher, ResponseFactory $responseFactory, TransformerOutputSurveyResponses $transformerOutputSurveyResponses, SurveyAnswerCache $answerCache) : mixed
Parameters
$survey : Survey
$permission : Permission
$responseFilterPatcher : FilterPatcher
$responseFactory : ResponseFactory
$transformerOutputSurveyResponses : TransformerOutputSurveyResponses
$answerCache : SurveyAnswerCache

buildCriteria()

protected buildCriteria(Request $request) : array<string|int, mixed>
Parameters
$request : Request
Return values
array<string|int, mixed>

buildPagination()

protected buildPagination(Request $request) : array<string|int, mixed>
Parameters
$request : Request
Return values
array<string|int, mixed>

getActualAid()

Get the actual answer ID using the shared answer cache.

protected getActualAid(int $questionID, int $scaleId, string $value) : int|null
Parameters
$questionID : int
$scaleId : int
$value : string
Return values
int|null

getQuestionFieldMap()

Get the question field map.

protected getQuestionFieldMap() : array<string|int, mixed>
Return values
array<string|int, mixed>

hasGlobalPermission()

protected hasGlobalPermission(string $sPermission, string $sCRUD[, int|null $iUserID = null ]) : Response
Parameters
$sPermission : string
$sCRUD : string
$iUserID : int|null = null
Return values
Response

| boolean

hasSurveyPermission()

protected hasSurveyPermission(int $iSurveyID, string $sPermission, string $sCRUD[, string|null $iUserID = null ]) : Response
Parameters
$iSurveyID : int
$sPermission : string
$sCRUD : string
$iUserID : string|null = null
Return values
Response

| boolean

mapResponsesToQuestions()

Map survey responses to survey questions.

protected mapResponsesToQuestions(array<string|int, mixed> $responses, array<string|int, mixed> $surveyQuestions) : array<string|int, mixed>
Parameters
$responses : array<string|int, mixed>
$surveyQuestions : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results