LimeSurvey API - Master branch

LanguageSettings
in package

Survey Updater Service LanguageSettings

Service class for survey language setting updating.

Dependencies are injected to enable mocking.

Table of Contents

Properties

$inputFields  : mixed
$modelPermission  : Permission|null
$modelSurvey  : Survey|null
$modelSurveyLanguageSetting  : SurveyLanguageSetting|null

Methods

__construct()  : mixed
update()  : bool
Update
updateLanguageSettings()  : void
Update language specific settings
getLanguageSettingsData()  : array<string|int, mixed>|null
Parse language settings from input data
getValue()  : mixed
Get Value

Properties

$inputFields

private mixed $inputFields = ['surveyls_url', 'surveyls_urldescription', 'surveyls_title', 'surveyls_alias', 'surveyls_description', 'surveyls_welcometext', 'surveyls_endtext', 'surveyls_policy_notice', 'surveyls_policy_error', 'surveyls_policy_notice_label', 'surveyls_dateformat', 'surveyls_numberformat']

Methods

update()

Update

public update(int $surveyId, array<string|int, mixed> $input) : bool

Input is an array of language specific settings keyed by language code. Each element is an array with one or more of the follow keys:

  • url
  • url_description
  • short_title
  • alias
  • description
  • welcome
  • end_text
  • policy_notice
  • policy_error
  • policy_notice_label
  • date_format
  • number_format
Parameters
$surveyId : int
$input : array<string|int, mixed>
Tags
throws
PersistErrorException
throws
NotFoundException
throws
PermissionDeniedException
Return values
bool

getLanguageSettingsData()

Parse language settings from input data

private getLanguageSettingsData(array<string|int, mixed> $input, string $languageCode) : array<string|int, mixed>|null
Parameters
$input : array<string|int, mixed>
$languageCode : string
Return values
array<string|int, mixed>|null

getValue()

Get Value

private getValue(array<string|int, mixed> $data, string $field[, string|null $default = null ]) : mixed
Parameters
$data : array<string|int, mixed>
$field : string
$default : string|null = null

        
On this page

Search results