Tokens Controller
This controller performs token actions
package | LimeSurvey |
---|---|
subpackage | Backend |
__construct( $controller = null, $id = null)
addDummies(integer $iSurveyId,string $subaction = ''): void
Throws |
|
---|
integer
string
addnew(integer $iSurveyId): void
Throws |
|
---|
integer
addPseudoParams(array $params): array
This is also used while rendering wrapped template SurveyCommonAction::renderWrappedTemplate()
Throws |
|
---|
array
Parameters to parse and populate
array
Populated parameters
beforeSideMenuRender(array $aData): string
REFACTORED in LayoutHelper
array
string
bounceprocessing(integer $iSurveyId): void
integer
bouncesettings(integer $iSurveyId): void
integer
browse(integer $iSurveyId,integer $limit = 50,integer $start): void
integer
integer
integer
clearEmailSessionCache(integer $iSurveyId): void
integer
delete(integer $iSurveyID): void
integer
deleteMultiple(): boolean
boolean
deleteToken(): boolean
The parameter 'sItem' can either be an array of ids or just a single id (int)
todo | separate this function in two: one for single delete and one for multiple delete |
---|---|
Throws |
|
boolean
deletetokenattributes(integer $iSurveyId): void
integer
dispatchBeforeTokenImport( $iSurveyId, $aToken, $iRecordCount, $aOptions): array
array
edit(integer $iSurveyId,integer $iTokenId,boolean $ajax = false): false|null
todo | When is this function used without Ajax? |
---|
integer
integer
boolean
false|null
editMultiple()
email(integer $iSurveyId): void
integer
exportdialog(integer $iSurveyId): void
integer
fetchExtraMenus(array $aData): \array<ExtraMenu>
array
\array
filterImportedResources(string $extractdir,string $destdir): array
deprecated | use ServiceClass FilterImportedResources instead ... (models/services/) |
---|
string
string
array
getEmailCacheName(integer $iSurveyId): string
integer
string
Cache name, like survey_1234_email_cache
getSQLemailstatuscondition(): string
string
SQL condition
getSQLremindercountcondition(): string
string
SQL condition
getSQLreminderdelaycondition(boolean $bEmail): string
boolean
string
SQL condition
getSubAction(): string
string
getTokenIds(): array
array
handletokenform(integer $iSurveyId,string $subaction,integer $iTokenId = "",boolean $ajax = false): void
integer
string
integer
boolean
import(integer $iSurveyId): void
integer
importldap(integer $iSurveyId): void
integer
index(integer $surveyid): void
integer
The survey ID
index(): void
kill(integer $iSurveyId): void
integer
listquestiongroups(array $aData)
listquestion groups
array
listquestions( $aData)
Throws |
|
---|
managetokenattributes(integer $iSurveyId): void
integer
newtokentable(integer $iSurveyId): void
integer
notifications()
nsurveysummary(array $aData)
Survey summary
array
prepExportToCPDB()
renderCentralContents(string $sAction,array|string $aViewUrls,array $aData = array()): string
string
array|string
array
string
renderInternal(string $_viewFile_, $_data_ = null, $_return_ = false)
inheritdoc | |
---|---|
string
renderJSON(array $aData, $success = true): void
REFACTORED in LSBaseController (this one called by a lot of actions in different controllers)
array
renderWrappedTemplate(string $sAction = '',array|string $aViewUrls = array(),array $aData = array(),string|boolean $sRenderFile = false)
Addition of parameters should be avoided if they can be added to $aData
NOTE FROM LOUIS : We want to remove this function, which doesn't respect MVC pattern. The work it's doing should be handle by layout files, and subviews inside views. Eg : for route "admin/survey/sa/listquestiongroups/surveyid/282267" the Group controller should use a main layout (with admin menu bar as a widget), then render the list view, in which the question group bar is called as a subview.
So for now, we try to evacuate all the renderWrappedTemplate logic (if statements, etc.) to subfunctions, then it will be easier to remove. Comments starting with //// indicate how it should work in the future
Throws |
|
---|
string
Current action, the folder to fetch views from
array|string
View url(s)
array
Data to be passed on. Optional.
string|boolean
File to be rendered as a layout. Optional.
requirePostRequest()
This is intended to be used on subactions. When possible (eg. when refactoring a SurveyCommonAction into an actual controller), use 'postOnly' filter instead.
Throws |
|
---|
route(string $sa,array<mixed,string> $get_vars): mixed
access | protected |
---|
string
array<mixed,string>
mixed
run()
runWithParams(array $params): boolean
array
URL Parameters
boolean
showHeaders(array $aData, $sendHTTPHeader = true)
array
showInviteOrReminderEmailForm(integer $iSurveyId,array $aSurveyLangs,array $aData): void
integer
array
array
surveyManagerBar(array $aData)
todo | Needs to be removed later. Duplication in LayoutHelper. |
---|---|
array
tokenify(integer $iSurveyId): void
integer
tokenIsSetInEmailCache(integer $iSurveyId, $tid,boolean $bIsInvitation)
Being set means the email has already been send.
integer
boolean
$return boolean
updateEncryption(string|integer $iSurveyId,array $aEncryptionSettings)
string|integer
array
The new attribute encryption status
updatenotification()
REFACTORED (in LayoutHelper.php)
updatetokenattributedescriptions(integer $iSurveyId): void
integer
updatetokenattributes(integer $iSurveyId): void
integer
userGroupBar(array $aData): void
REFACTORED (it's in UserGroupController and uses function from Layouthelper->renderMenuBar())
array