Questionnaire class definition

This class has been auto-generated by the Doctrine ORM Framework

package Webenq_Models
author Bart Huttinga
subpackage
version SVN: $Id: Builder.php,v 1.2 2011/07/12 13:39:03 bart Exp $

 Methods

edit()

edit() 
Static

Returns true if this question is present in more than one questionnaire, and returns false otherwise.

existsInMultipleQuestionnaires() : bool

Returns

boolTrue or false

find()

find($id) 

Parameters

$id

fromArray()

fromArray(array $array, $deep) 

Parameters

$array

$deep

getAnswer()

getAnswer(\Webenq_Model_Respondent $respondent) 

Parameters

$respondent

getAnswerOptions()

getAnswerOptions($questionText) 
Static

Parameters

$questionText

getAvailablePresentationMethod()

getAvailablePresentationMethod($type) 
Static

Parameters

$type

Returns an instance of Zend_Form_SubForm if it has sub-questions, and an instance of Zend_Form_Element otherwise.

getFormElement(\Webenq_Model_Respondent $respondent) : \Zend_Form_SubForm | \Zend_Form_Element

Parameters

$respondent

\Webenq_Model_Respondent

(optional) If provided the form element is filled with the respondent's answer

Returns

\Zend_Form_SubForm\Zend_Form_Element

getQuestionText()

getQuestionText() 

Returns the subquestions for the given questionnaire-question.

getSubQuestions(\Webenq_Model_QuestionnaireQuestion | array $qq, $mode) : \Doctrine_Collection
Static

Note that the grouping of questions can be different for collection mode and reporting mode. Therefor, the mode can be given as second parameter. It defaults to the mode 'collection'.

Parameters

$mode

Can be 'collection' or 'report'

Returns

\Doctrine_Collectioncontaining instances of QuestionnaireQuestion

getType()

getType() 

Returns a xform bind element, to be used in the html head of a html/xform document

getXformBindElements(\DOMDocument $xml, array $elements) : \DOMElement

Parameters

$elements

array

Returns

getXformData()

getXformData(\Webenq_Model_Respondent $respondent, \DOMDocument $xml, \DOMElement $group) 

Parameters

$respondent

$xml

$group

Returns a xform element or nested group of xform elements, to be used in the html body of a html/xform document

getXformElement(\DOMDocument $xml, \DOMElement $group) : \DOMElement

Parameters

$group

\DOMElement

Returns

Returns a xform instance element or nested group of xform instance elements, to be used in the html head of a html/xform document

getXformInstanceElement(\DOMDocument $xml, \DOMElement $group) : \DOMElement

Parameters

$group

\DOMElement

Returns

Returns the xpath to the current question for use in a xform

getXpath() : string

Returns

string

hasAnswer()

hasAnswer(\Webenq_Model_Respondent $respondent) 

Parameters

$respondent

saveQuestionText()

saveQuestionText() 

setTableDefinition()

setTableDefinition() 
Inherited
inherited_from \Webenq_Model_Base_QuestionnaireQuestion::setTableDefinition()

setUp()

setUp() 
Inherited
inherited_from \Webenq_Model_Base_QuestionnaireQuestion::setUp()

Fills array with data in record and fills related objects with translations

toArray(bool $deep, bool $prefixKey) : array
see \Doctrine_Record::fromArray()

Parameters

$deep

bool

$prefixKey

bool

Not used

Returns

array

_getParents()

_getParents() : array
todo It now returns the parents of the current questionnaire-quesiton, following the hierarchy of the data collection. In the future this should be changed to reporting hierarchy. Data collection and data reporting do not need to follow the same structure.

Returns

array

 Properties

 

$_questionText : string