Class exposing a Limesurvey API to plugins.
This class is instantiated by the plugin manager, plugins can obtain it by calling getAPI() on the plugin manager.
package | Default |
---|
addUserGroup(string $groupName,string $groupDescription): boolean
Throws |
|
---|
string
Name of user group to be created
string
Description of user group to be created
boolean
True or false if user group was added or not
addUserInGroup(integer $ugid,integer $uid): boolean
Throws |
|
---|
integer
The user group ID
integer
The user ID
boolean
True if user was added to group or false if not
checkAccess(string $operation,array $params = array(),boolean $allowCaching = true): boolean
see | http://www.yiiframework.com/doc/api/1.1/CWebUser#checkAccess-detail |
---|
string
array
boolean
boolean
createTable(\LimeSurvey\PluginManager\PluginBase $plugin,string $sTableName,array $aColumns,\LimeSurvey\PluginManager\?string $sOptions = null): integer|false
string
the name of the table to be created. The name will be properly quoted and prefixed by the method.
array
the columns (name=>definition) in the new table.
\LimeSurvey\PluginManager\?string
additional SQL fragment that will be appended to the generated SQL.
integer|false
number of rows affected by the execution.
createUrl( $route,array $params)
array
dropTable(mixed $plugin,string $sTableName)
mixed
The plugin object, id or name.
string
the name of the table to be created. The name will be properly quoted and prefixed by the method.
EMevaluateExpression(string $expression): string
string
string
getConfigKey(string $key,mixed $defaultValue = false): string
string
The key to search for in the application config
mixed
Value to return when not found, default is false
string
getCurrentResponses(integer $surveyId = null): \Response|null
getCurrentUser(): \LimeSurvey\PluginManager\?User|false
\LimeSurvey\PluginManager\?User|false
Returns false if the user is not logged and returns null if the user does not exist anymore for some reason (should not really happen)
getGroupList(integer $surveyId): array<mixed,\QuestionGroup>
getOldResponseTables(integer $surveyId): array<mixed,string>
integer
array<mixed,string>
getParticipant(integer $iParticipantID): \LimeSurvey\PluginManager\?\Participant
integer
The Participant ID
\LimeSurvey\PluginManager\?\Participant
Returns null if the user does not exist anymore for some reason (should not really happen)
getPermissionSet(integer $iUserID, $iEntityID = null,\LimeSurvey\PluginManager\?string $sEntityName = null): \LimeSurvey\PluginManager\?array
integer
The User ID
\LimeSurvey\PluginManager\?string
\LimeSurvey\PluginManager\?array
Returns null if the user does not exist anymore for some reason (should not really happen)
getQuestionAttributes(integer $questionId,string|null $language = null): \LimeSurvey\PluginManager\array<string,
Throws |
|
---|
integer
the ID of the question
string|null
restrict to this language
\LimeSurvey\PluginManager\arraymixed> array of question attributes and values (name=>value)
getQuestions(integer $surveyId,string $language = 'en', $conditions = array()): array<mixed,\Question>
integer
string
$param array $conditions
array<mixed,\Question>
getResponse(integer $surveyId,integer $responseId,boolean $bMapQuestionCodes = true): array|\SurveyDynamic|null
integer
integer
boolean
array|\SurveyDynamic|null
getResponses( $surveyId, $attributes = array(), $condition = '', $params = array()): array<mixed,\Response>|null
getResponseTable(integer $surveyId): string
integer
string
getTable(\LimeSurvey\PluginManager\iPlugin $plugin,string $sTableName,\LimeSurvey\PluginManager\?boolean $bPluginTable = true): \Plugin|null
string
Name of the table.
\LimeSurvey\PluginManager\?boolean
True if the table is plugin specific.
\Plugin|null
getTableName(\LimeSurvey\PluginManager\iPlugin $plugin,string $tableName)
getTableSchema(string $table,boolean $forceRefresh = false): \CDbTableSchema
For details on the object check: http://www.yiiframework.com/doc/api/1.1/CDbTableSchema
string
Table name.
boolean
False if cached information is acceptable; setting this to true could affect performance.
\CDbTableSchema
Table schema object, NULL if the table does not exist.
getTemplateList(): array
array
getToken( $surveyId, $token): \LimeSurvey\PluginManager\?\Token
\LimeSurvey\PluginManager\?\Token
getTokenById(integer $iSurveyId,integer $iTokenId): \LimeSurvey\PluginManager\?\Token
integer
integer
\LimeSurvey\PluginManager\?\Token
Token
getUser(integer $iUserID): \LimeSurvey\PluginManager\?User
integer
The userid
\LimeSurvey\PluginManager\?User
getUserByEmail(string|null $email): \User|null
getUserByName(string $username): \User|null
getUserGroup(integer $ugid): \UserGroup|null
getUserGroups(): array
array
getUserInGroup(integer $ugid,integer $uid): \UserInGroup|null
newModel(\LimeSurvey\PluginManager\iPlugin $plugin,string $sTableName,\LimeSurvey\PluginManager\?string $scenario = 'insert',\LimeSurvey\PluginManager\?boolean $bPluginTable = true): \LimeSurvey\PluginManager\?\PluginDynamic
string
\LimeSurvey\PluginManager\?string
\LimeSurvey\PluginManager\?boolean
True if the table is plugin specific.
\LimeSurvey\PluginManager\?\PluginDynamic
pluginExists(string $name): boolean
Throws |
|
---|
string
Name of plugin
boolean
pluginIsActive(string $name): boolean
Throws |
|
---|
string
Name of plugin
boolean
removeResponse( $surveyId, $responseId)
removeUserInGroup(integer $ugid,integer $uid): boolean
Throws |
|
---|
integer
The user group ID
integer
The user ID
boolean
True if user was removed to group or false if not
renderTwig(string $file,array $data): string
string
array
string
setFlash(string $message,string $key = 'api'): void
string
string
tableExists(\LimeSurvey\PluginManager\iPlugin $plugin,string $sTableName): boolean
string
Table name to check for (without dbprefix!))
boolean
True or false if table exists or not