modules/questionnaire/models/Question.phpView Source

Show: PublicProtectedPrivateinherited
Table of Contents
Package
Default  

\Questionnaire_Model_Question

Package: Questionnaire\Models
Created by PhpStorm.

User: Evgeniy Date: 06.11.13 Time: 20:32

Properties

>VPropertyprivateinteger $_id
quesstionnaire id
Details
Type
integer
>VPropertyprivateobject $_tbl
questionnaire db table obj
Details
Type
object
>VPropertyprivateobject $_tbl_lang
Questionnaire lang db table obj
Details
Type
object

Methods

methodpublic__construct(integer $question_id = 0) : void

Constructor

Parameters
NameTypeDescription
$question_idinteger
methodpublicchangeType(mixed $orig, mixed $data,  $sub_q) : void

Change type of question

Parameters
NameTypeDescription
$origmixed
$datamixed
$sub_q
methodpubliccopyTo(integer $dst_qst_id, integer $target_question_id = 0) : void

Copy question from one questionnaire to another

Parameters
NameTypeDescription
$dst_qst_idinteger
$target_question_idinteger
methodpublicgetTranslation(string $lng) : array

Ger translatin by lang

Parameters
NameTypeDescription
$lngstring
Returns
TypeDescription
array
methodpublicgetTranslations(array $question_ids, string $lng) : array

Get translations for questions

Parameters
NameTypeDescription
$question_idsarray
$lngstring
Returns
TypeDescription
array
methodpublictranslateQuestion(string $lang, integer $question_id = 0) : mixed

process tranlation for some question

Parameters
NameTypeDescription
$langstring
$question_idinteger
Returns
TypeDescription
mixed
methodpublictranslateQuestionQbject(\[type] $lang, \[type] $questionObject) : \[type]

[translateQuestionQbject description]

Parameters
NameTypeDescription
$lang\[type]

[description]

$questionObject\[type]

[description]

Returns
TypeDescription
\[type][description]
methodpublicupdateQuestionRow(mixed $question, array $translation) : mixed

Update question translations

Parameters
NameTypeDescription
$questionmixed
$translationarray
Returns
TypeDescription
mixed
methodpublicupdateQuestionsRows(\[type] $questions, \[type] $translation) : \[type]

Get all question rows for updateing

Parameters
NameTypeDescription
$questions\[type]

[description]

$translation\[type]

[description]

Returns
TypeDescription
\[type][description]
Documentation was generated by phpDocumentor 2.8.5.