Class LSBaseController
this controller will have all the necessary methods from the old AdminController
package | Default |
---|
__construct(string $id,\CWebModule $module = null)
access | public |
---|---|
string
\CWebModule
_checkInstallation(): void
access | protected |
---|---|
accessRules(): array
Only logged in users should have access to actions. All other permissions should be checked in the action itself.
array
actionAdd(integer $surveyid,string $landOnSideMenuTab = 'structure'): void
integer
string
actionDelete(boolean $asJson = false): void
Could be an ajaxRequest OR a redirect to list question groups
access | public |
---|---|
Throws |
|
boolean
Value of to Render as JSON
actionEdit(integer $surveyid,integer $gid,string $landOnSideMenuTab = 'structure')
integer
survey id is important here if group does not exist
integer
string
actionGetQuestionGroupTopBar(integer $sid, $gid = null): mixed
Throws |
|
---|
integer
ID of survey
mixed
actionGetQuestionsForGroup( $iQuestionGroupId): void
Returns all questions that belong to the group.
integer ID of question group
actionImport(): void
access | public |
---|---|
actionImportView(integer $surveyid, $landOnSideMenuTab = 'structure'): void
integer
actionListquestiongroups(integer $surveyid): void
(this action comes from old surveyadmin controller ...)
access | public |
---|
integer
The survey ID
actionLoadQuestionGroup(integer $surveyid,null $iQuestionGroupId = null)
Returns the data for a question group. If question group does not exists a new question group will be returned (not saved)
todo: is this function still in use?
integer
null
actionSaveQuestionGroupData(integer $sid): void
Creates and updates question groups
Throws |
|
---|
integer
ID of survey
actionUpdateOrder(integer $surveyid): false|null|string|array<mixed,string>
Throws |
|
---|
integer
false|null|string|array<mixed,string>
actionView(integer $surveyid,integer $gid,string $landOnSideMenuTab = 'structure',string $mode = 'auto')
integer
survey id is important here for new questiongroups without groupid
integer
string
string
either 'overview' or 'auto'. The 'overview' mode ignores the 'noViewMode' user setting
applyI10N(\QuestionGroup &$oQuestionGroup,array $dataSet): boolean
\QuestionGroup
array
array with languages
boolean
true if ALL languages could be safed, false otherwise
beforeRender(string $view): boolean
todo REFACTORING find all actions that set $aData['surveyid'] and change the layout directly in the action
string
boolean
createAbsoluteUrl(string $route,array $params = array(),string $schema = '',string $ampersand = '&'): string
string
the URL route. This should be in the format of 'ControllerID/ActionID'.
array
additional GET parameters (name=>value). Both the name and value will be URL-encoded.
string
schema to use (e.g. http, https). If empty, the schema used for the current request will be used.
string
the token separating name-value pairs in the URL.
string
the constructed URL
customInit()
editQuestionGroup(\QuestionGroup &$oQuestionGroup,array $aQuestionGroupData): \QuestionGroup
Throws |
|
---|
\QuestionGroup
array
\QuestionGroup
getQuestionGroupObject(integer $iSurveyId, $iQuestionGroupId = null): \QuestionGroup
loadHelper(string $helper): void
access | public |
---|
string
loadLibrary(string $library): void
access | public |
---|
string
loadPageStates(): array
array
the loaded page states
newQuestionGroup(integer $iSurveyId,array $aQuestionGroupData = null): \QuestionGroup
renderJSON(array $aData, $success = true): void
array
run(string $action): void
TODO: check the dbupdate mechanism, do we really want to check db update before every action??
access | public |
---|---|
Throws |
|
string
sessionControl(): void
todo REFACTORING see comments in mehtod
access | protected |
---|---|
sTemplate :null
var | this is needed for the preview rendering inside the questioneditor |
---|
null
aData :array
var | import for all new controllers/actions (REFACTORING) to pass data before rendering the content |
---|
array
userId :integer
var | userId of the logged in user |
---|
integer
navData :array
var |
---|
array