LimeSurvey API - Master branch

SurveyLanguageSetting extends LSActiveRecord
in package

Class SurveyLanguageSetting

Table of Contents

Properties

$attachments  : string
$bEncryption  : mixed
$owner  : User
$survey  : Survey
$surveyls_admin_notification  : string
$surveyls_admin_notification_subj  : string
$surveyls_admin_responses  : string
$surveyls_admin_responses_subj  : string
$surveyls_attributecaptions  : string
$surveyls_dateformat  : string
$surveyls_description  : string
$surveyls_email_confirm  : string
$surveyls_email_confirm_subj  : string
$surveyls_email_invite  : string
$surveyls_email_invite_subj  : string
$surveyls_email_register  : string
$surveyls_email_register_subj  : string
$surveyls_email_remind  : string
$surveyls_email_remind_subj  : string
$surveyls_endtext  : string
$surveyls_language  : string
$surveyls_numberformat  : int
$surveyls_policy_notice  : string
$surveyls_survey_id  : int
$surveyls_title  : string
$surveyls_url  : string
$surveyls_urldescription  : string
$surveyls_welcometext  : string
$xssFilterAttributes  : array<string|int, string>
$oldAlias  : mixed
$oldSurveyId  : mixed

Methods

attachmentsInfo()  : mixed
Defines the customs validation rule attachmentsInfo
behaviors()  : array<string|int, mixed>
Lists the behaviors of this model
checkAliasUniqueness()  : mixed
Validates that the alias is not used in another survey
decrypt()  : mixed
Decrypt values from database
decryptEncryptAttributes()  : mixed
Encrypt/decrypt values
decryptSingle()  : string
Decrypt single value
decryptSingleOld()  : string
Decrypt single value
defaultScope()  : mixed
deleteAllByAttributes()  : int
dispatchPluginModelEvent()  : PluginEvent
encrypt()  : mixed
Encrypt values
encryptAttributeValues()  : array<string|int, mixed>
Attribute values are encrypted ( if needed )to be used for searching purposes
encryptSave()  : mixed
Encrypt values before saving to the database
encryptSingle()  : mixed
Enrypt single value
findAllAsArray()  : array<string|int, mixed>
Finds all active records satisfying the specified condition but returns them as array
findAllByAttributes()  : array<string|int, static>
Overriding of Yii's findAllByAttributes method to provide encrypted attribute value search
findByAttributes()  : static|null
Overriding of Yii's findByAttributes method to provide encrypted attribute value search
getAllEncryptedAttributes()  : array<string|int, mixed>
getAllSurveys()  : mixed
getAttachmentsData()  : array<string, array<string, mixed>>
Returns the array of email attachments data without exposing sensitive paths
getAttributeCaptions()  : array<string|int, mixed>
Returns the token's captions
getDateFormat()  : mixed
getMaxId()  : false|int
Return the max value for a field
getMinId()  : false|int
Return the min value for a field
insertNewSurvey()  : bool
insertSomeRecords()  : bool
lsdefault()  : mixed
Defines the customs validation rule lsdefault
model()  : SurveyLanguageSetting
primaryKey()  : mixed
relations()  : mixed
rules()  : mixed
setEncryptedAttributeLabel()  : string
Function to show encryption symbol in gridview attribute header if value ois encrypted
tableName()  : mixed
updateAll()  : int
Updates records with the specified condition.
updateRecord()  : bool
Updates a single record identified by $condition with the key/value pairs in the $data array.
afterFind()  : mixed
query()  : mixed
Modified version that default to do the same as the original, but allows via a third parameter to retrieve the result as array instead of active records. This solves a joining problem. Usage via findAllAsArray method

Properties

$surveyls_admin_notification

public string $surveyls_admin_notification

Body of basic admin notification e-mail in this language

$surveyls_admin_notification_subj

public string $surveyls_admin_notification_subj

Subject of basic admin notification e-mail in this language

$surveyls_admin_responses

public string $surveyls_admin_responses

Body of detailed admin notification e-mail in this language

$surveyls_admin_responses_subj

public string $surveyls_admin_responses_subj

Subject of detailed admin notification e-mail in this language

$surveyls_description

public string $surveyls_description

Survey description in this language

$surveyls_email_confirm

public string $surveyls_email_confirm

Survey confitmation e-mail body in this language

$surveyls_email_confirm_subj

public string $surveyls_email_confirm_subj

Survey confirmation e-mail subject for this language

$surveyls_email_invite

public string $surveyls_email_invite

Survey inivitation e-mail body in this language

$surveyls_email_invite_subj

public string $surveyls_email_invite_subj

Survey inivitation e-mail subject for this language

$surveyls_email_register

public string $surveyls_email_register

Survey registration e-mail body in this language

$surveyls_email_register_subj

public string $surveyls_email_register_subj

Survey registration e-mail subject for this language

$surveyls_email_remind

public string $surveyls_email_remind

Survey reminder e-mail body in this language

$surveyls_email_remind_subj

public string $surveyls_email_remind_subj

Survey reminder e-mail subject for this language

$surveyls_numberformat

public int $surveyls_numberformat

Survey decimal mark for this language (0: '.', 1: ',')

$surveyls_policy_notice

public string $surveyls_policy_notice

The survey data-security notice

$surveyls_urldescription

public string $surveyls_urldescription

Survey end-url description for this language

$surveyls_welcometext

public string $surveyls_welcometext

Survey welcome-text in this language

$xssFilterAttributes

protected array<string|int, string> $xssFilterAttributes = []

Array of attributes that should be XSS filtered on mass updates

Methods

attachmentsInfo()

Defines the customs validation rule attachmentsInfo

public attachmentsInfo(mixed $attribute) : mixed
Parameters
$attribute : mixed

behaviors()

Lists the behaviors of this model

public behaviors() : array<string|int, mixed>

Below is a list of all behaviors we register:

Tags
see
PluginEventBehavior
see
CTimestampBehavior
Return values
array<string|int, mixed>

checkAliasUniqueness()

Validates that the alias is not used in another survey

public checkAliasUniqueness() : mixed

decrypt()

Decrypt values from database

public decrypt([mixed $value = '' ]) : mixed
Parameters
$value : mixed = ''

decryptEncryptAttributes()

Encrypt/decrypt values

public decryptEncryptAttributes([mixed $action = 'decrypt' ]) : mixed
Parameters
$action : mixed = 'decrypt'

decryptSingle()

Decrypt single value

public static decryptSingle([string $value = '' ]) : string
Parameters
$value : string = ''

String value which needs to be decrypted

Return values
string

the decrypted string

decryptSingleOld()

Decrypt single value

public static decryptSingleOld([string $value = '' ]) : string
Parameters
$value : string = ''

String value which needs to be decrypted

Return values
string

the decrypted string

deleteAllByAttributes()

public deleteAllByAttributes(array<string|int, mixed> $attributes[, string $condition = '' ][, array<string|int, mixed> $params = [] ]) : int
Parameters
$attributes : array<string|int, mixed>

list of attribute values (indexed by attribute names) that the active records should match. An attribute value can be an array which will be used to generate an IN condition.

$condition : string = ''

query condition or criteria.

$params : array<string|int, mixed> = []

parameters to be bound to an SQL statement.

Tags
todo

This should also be moved to the behavior at some point. This method overrides the parent in order to raise PluginEvents for Bulk delete operations.

Filter Criteria are wrapped into a CDBCriteria instance so we have a single instance responsible for holding the filter criteria to be passed to the PluginEvent, this also enables us to pass the fully configured CDBCriteria instead of the original Parameters.

See for detailed explanation about $condition and $params.

Return values
int

number of rows affected by the execution.

dispatchPluginModelEvent()

public dispatchPluginModelEvent(string $sEventName, CDbCriteria $criteria = null, array<string|int, mixed> $eventParams = []) : PluginEvent
Parameters
$sEventName : string
$criteria = null : CDbCriteria
$eventParams = [] : array<string|int, mixed>
Return values
PluginEvent

encryptAttributeValues()

Attribute values are encrypted ( if needed )to be used for searching purposes

public encryptAttributeValues([array<string|int, mixed> $attributes = null ][, mixed $bEncryptedOnly = false ][, mixed $bReplaceValues = true ]) : array<string|int, mixed>
Parameters
$attributes : array<string|int, mixed> = null

list of attribute values (indexed by attribute names) that the active records should match. An attribute value can be an array which will be used to generate an IN condition.

$bEncryptedOnly : mixed = false
$bReplaceValues : mixed = true
Return values
array<string|int, mixed>

attributes array with encrypted atrribute values is returned

encryptSave()

Encrypt values before saving to the database

public encryptSave([mixed $runValidation = false ]) : mixed
Parameters
$runValidation : mixed = false

encryptSingle()

Enrypt single value

public static encryptSingle([string $value = '' ]) : mixed
Parameters
$value : string = ''

String value which needs to be encrypted

findAllAsArray()

Finds all active records satisfying the specified condition but returns them as array

public findAllAsArray([mixed $condition = '' ][, array<string|int, mixed> $params = [] ]) : array<string|int, mixed>

See for detailed explanation about $condition and $params.

Parameters
$condition : mixed = ''

query condition or criteria.

$params : array<string|int, mixed> = []

parameters to be bound to an SQL statement.

Return values
array<string|int, mixed>

list of active records satisfying the specified condition. An empty array is returned if none is found.

findAllByAttributes()

Overriding of Yii's findAllByAttributes method to provide encrypted attribute value search

public findAllByAttributes(array<string|int, mixed> $attributes[, mixed $condition = '' ][, array<string|int, mixed> $params = [] ]) : array<string|int, static>
Parameters
$attributes : array<string|int, mixed>

list of attribute values (indexed by attribute names) that the active records should match. An attribute value can be an array which will be used to generate an IN condition.

$condition : mixed = ''

query condition or criteria.

$params : array<string|int, mixed> = []

parameters to be bound to an SQL statement.

Return values
array<string|int, static>

the records found. An empty array is returned if none is found.

findByAttributes()

Overriding of Yii's findByAttributes method to provide encrypted attribute value search

public findByAttributes(array<string|int, mixed> $attributes[, mixed $condition = '' ][, array<string|int, mixed> $params = [] ]) : static|null
Parameters
$attributes : array<string|int, mixed>

list of attribute values (indexed by attribute names) that the active record should match. An attribute value can be an array which will be used to generate an IN condition.

$condition : mixed = ''

query condition or criteria.

$params : array<string|int, mixed> = []

parameters to be bound to an SQL statement.

Return values
static|null

the record found. Null if none is found.

getAllEncryptedAttributes()

public getAllEncryptedAttributes(int $iSurveyId, string $sClassName) : array<string|int, mixed>
Parameters
$iSurveyId : int
$sClassName : string
Return values
array<string|int, mixed>

TODO: Should be split into seperate functions in the appropiate model or helper class TODO: Make an interface for records that support encryption.

getAllSurveys()

public getAllSurveys([bool $hasPermission = false ]) : mixed
Parameters
$hasPermission : bool = false

getAttachmentsData()

Returns the array of email attachments data without exposing sensitive paths

public getAttachmentsData() : array<string, array<string, mixed>>
Return values
array<string, array<string, mixed>>

getAttributeCaptions()

Returns the token's captions

public getAttributeCaptions() : array<string|int, mixed>
Tags
access

public

Return values
array<string|int, mixed>

getDateFormat()

public getDateFormat(int $surveyid, string $languagecode) : mixed
Parameters
$surveyid : int
$languagecode : string

getMaxId()

Return the max value for a field

public getMaxId([string $field = null ][, bool $forceRefresh = false ]) : false|int

This is a convenience method, that uses the primary key of the model to retrieve the highest value.

Parameters
$field : string = null

The field that contains the Id, when null primary key is used if it is a single field

$forceRefresh : bool = false

Don't use value from static cache but always requery the database

Tags
throws
Exception
Return values
false|int

getMinId()

Return the min value for a field

public getMinId([string $field = null ][, bool $forceRefresh = false ]) : false|int

This is a convenience method, that uses the primary key of the model to retrieve the highest value.

Parameters
$field : string = null

The field that contains the Id, when null primary key is used if it is a single field

$forceRefresh : bool = false

Don't use value from static cache but always requery the database

Tags
throws
Exception
Return values
false|int

insertNewSurvey()

public insertNewSurvey(array<string|int, mixed> $data) : bool
Parameters
$data : array<string|int, mixed>
Tags
todo

: rename and fix this

Return values
bool

insertSomeRecords()

public insertSomeRecords(array<string|int, mixed> $data) : bool
Parameters
$data : array<string|int, mixed>
Return values
bool

lsdefault()

Defines the customs validation rule lsdefault

public lsdefault(mixed $attribute) : mixed
Parameters
$attribute : mixed

setEncryptedAttributeLabel()

Function to show encryption symbol in gridview attribute header if value ois encrypted

public setEncryptedAttributeLabel(int $surveyId, string $className, string $attributeName) : string
Parameters
$surveyId : int
$className : string
$attributeName : string
Tags
throws
CException
Return values
string

updateAll()

Updates records with the specified condition.

public updateAll(array<string|int, mixed> $attributes[, mixed $condition = '' ][, array<string|int, mixed> $params = array() ]) : int

XSS filtering is enforced for attributes listed in model's $xssFilterAttributes property. See for detailed explanation about $condition and $params. Note, the attributes are not checked for safety and no validation is done.

Parameters
$attributes : array<string|int, mixed>

list of attributes (name=>$value) to be updated

$condition : mixed = ''

query condition or criteria.

$params : array<string|int, mixed> = array()

parameters to be bound to an SQL statement.

Return values
int

the number of rows being updated

updateRecord()

Updates a single record identified by $condition with the key/value pairs in the $data array.

public updateRecord(array<string|int, mixed> $data[, string|array<string|int, mixed> $condition = '' ][, bool $xssfiltering = false ]) : bool
Parameters
$data : array<string|int, mixed>
$condition : string|array<string|int, mixed> = ''
$xssfiltering : bool = false
Return values
bool

query()

Modified version that default to do the same as the original, but allows via a third parameter to retrieve the result as array instead of active records. This solves a joining problem. Usage via findAllAsArray method

protected query(CDbCriteria $criteria[, bool $all = false ][, bool $asAR = true ]) : mixed

Performs the actual DB query and populates the AR objects with the query result. This method is mainly internally used by other AR query methods.

Parameters
$criteria : CDbCriteria

the query criteria

$all : bool = false

whether to return all data

$asAR : bool = true
Tags
since
1.1.7
Return values
mixed

the AR objects populated with the query result


        
On this page

Search results