public function getTranslators($controller, $filename = null)
    {
        $translator = $this->getTranslateAdapter();

        switch ($controller) {
            case 'answers':
                $output['default'] = new \Gems_Model_Translator_TokenAnswerTranslator(
                        $translator->_('Link by token id')
                        );
                $output['resp']    = new \Gems_Model_Translator_RespondentAnswerTranslator(
                        $translator->_('Link by patient id')
                        );
                $output['date']    = new \Gems_Model_Translator_DateAnswerTranslator(
                        $translator->_('Link by patient id and completion date')
                        );
                break;

            case 'calendar':
                $output['default'] = new \Gems_Model_Translator_AppointmentTranslator($translator->_('Direct import'));
                break;

            case 'respondent':
                $output['default'] = new \Gems_Model_Translator_RespondentTranslator($translator->_('Direct import'));
                break;

            case 'staff':
                $output['default'] = new \Gems_Model_Translator_StaffTranslator($translator->_('Direct import'));
                break;

            default:
                $output['default'] = new \Gems_Model_Translator_StraightTranslator($translator->_('Direct import'));
                break;
        }

        foreach ($output as $trs) {
            $this->applySource($trs);
        }

        return $output;
    }
public function getTranslators($controller, $filename = null)
    {
        $translator = $this->getTranslateAdapter();

        switch ($controller) {
            case 'answers':
                $output['default'] = new \Gems_Model_Translator_TokenAnswerTranslator(
                        $translator->_('Link by token id')
                        );
                $output['resp']    = new \Gems_Model_Translator_RespondentAnswerTranslator(
                        $translator->_('Link by patient id')
                        );
                $output['date']    = new \Gems_Model_Translator_DateAnswerTranslator(
                        $translator->_('Link by patient id and completion date')
                        );
                break;

            case 'calendar':
                $output['default'] = new \Gems_Model_Translator_AppointmentTranslator($translator->_('Direct import'));
                break;

            case 'respondent':
                $output['default'] = new \Gems_Model_Translator_RespondentTranslator($translator->_('Direct import'));
                break;

            case 'staff':
                $output['default'] = new \Gems_Model_Translator_StaffTranslator($translator->_('Direct import'));
                break;

            default:
                $output['default'] = new \Gems_Model_Translator_StraightTranslator($translator->_('Direct import'));
                break;
        }

        foreach ($output as $trs) {
            $this->applySource($trs);
        }

        return $output;
    }
public function getTranslators ( $ controller , $ filename = null ) { $ translator = $ this -> getTranslateAdapter ( ) ; switch ( $ controller ) { case 'answers' : $ output [ 'default' ] = new \ Gems_Model_Translator_TokenAnswerTranslator ( $ translator -> _ ( 'Link by token id' ) ) ; $ output [ 'resp' ] = new \ Gems_Model_Translator_RespondentAnswerTranslator ( $ translator -> _ ( 'Link by patient id' ) ) ; $ output [ 'date' ] = new \ Gems_Model_Translator_DateAnswerTranslator ( $ translator -> _ ( 'Link by patient id and completion date' ) ) ; break ; case 'calendar' : $ output [ 'default' ] = new \ Gems_Model_Translator_AppointmentTranslator ( $ translator -> _ ( 'Direct import' ) ) ; break ; case 'respondent' : $ output [ 'default' ] = new \ Gems_Model_Translator_RespondentTranslator ( $ translator -> _ ( 'Direct import' ) ) ; break ; case 'staff' : $ output [ 'default' ] = new \ Gems_Model_Translator_StaffTranslator ( $ translator -> _ ( 'Direct import' ) ) ; break ; default : $ output [ 'default' ] = new \ Gems_Model_Translator_StraightTranslator ( $ translator -> _ ( 'Direct import' ) ) ; break ; } foreach ( $ output as $ trs ) { $ this -> applySource ( $ trs ) ; } return $ output ; }
Get the possible translators for the import snippet.

@param string $controller Name of controller (or other id)
@param string $filename Optional, name of file to import
@return \MUtil_Model_ModelTranslatorInterface[]
Get the possible translators for the import snippet .