The export interface

Exporting survey-data can be done for various sorts of output formats, this interface describes the methods needed to implement an output format

package Gems
subpackage Export
copyright Copyright (c) 2011 Erasmus MC
license New BSD License
since Class available since version 1.5

 Methods

Sets the default form values when this export type is first chosen

getDefaults() : array

Returns

array

Return an array of Form Elements for this specific export

getFormElements(\type $form, \type $data) : array

Parameters

$form

\type

$data

\type

Returns

arrayof \Zend_Form_Element

Returns the unique name for this class

getName() : string

It will be used for handling this export's specific options

Returns

string

This method handles the export with the given options

handleExport(array $data, \Gems_Tracker_Survey $survey, array $answers, \MUtil_Model_ModelAbstract $answerModel, string $language) 

The method takes care of rendering the right script by using $this->export->controller to access the controller object.

Parameters

$data

array

The formdata

$survey

\Gems_Tracker_Survey

The survey object we are exporting

$answers

array

The array of answers

$answerModel

\MUtil_Model_ModelAbstract

The modified answermodel that includes info about extra attributes

$language

string

The language used / to use for the export