EditorRequestHelper
in package
Table of Contents
Methods
- findQuestionGroupId() : string|null
- Find question group id in the current request
- findQuestionId() : string|null
- Find question id in the current request
- findSurveyId() : string|null
- Find survey id in the current request
Methods
findQuestionGroupId()
Find question group id in the current request
public
static findQuestionGroupId([CHttpRequest|null $request = null ]) : string|null
Searches for the question group id across different parameter names due to inconsistency in how question group id is specified in requests.
Parameters
- $request : CHttpRequest|null = null
-
The HTTP request object. If null, uses the application's current request.
Return values
string|null —The question group ID if found in the request, null otherwise.
findQuestionId()
Find question id in the current request
public
static findQuestionId([CHttpRequest|null $request = null ]) : string|null
Searches for the question id across different parameter names due to inconsistency in how question id is specified in requests.
Parameters
- $request : CHttpRequest|null = null
-
The HTTP request object. If null, uses the application's current request.
Return values
string|null —The question ID if found in the request, null otherwise.
findSurveyId()
Find survey id in the current request
public
static findSurveyId([CHttpRequest|null $request = null ]) : string|null
There is inconsistency in how survey id is specified in a request this method finds the survey id in the current request when we dont know in advance how the survey id was specified.
The long term solution for this is to ensure the application alwatys uses the same format for specifying survey id.
Parameters
- $request : CHttpRequest|null = null