get translatorHelper

@return  Zend\Mvc\I18n\Translator
518492
private function getTranslatorHelper()
    {
        if (null === $this->translatorHelper) {
           $this->translatorHelper = $this->getServiceLocator()->get('MvcTranslator');
        }
      
        return $this->translatorHelper;
    }
126486
protected function getElementHelper()
    {
        if ($this->elementHelper) {
            return $this->elementHelper;
        }

        if (method_exists($this->view, 'plugin')) {
            $this->elementHelper = $this->view->plugin('form_element');
        }

        if (!$this->elementHelper instanceof FormElement) {
            $this->elementHelper = new FormElement();
        }

        return $this->elementHelper;
    }
1285776
protected function getStaticElementHelper()
    {
        if ($this->staticElementHelper) {
            return $this->staticElementHelper;
        }

        $renderer = $this->getView();
        if (method_exists($this->view, 'plugin')) {
            $this->staticElementHelper = $renderer->plugin($this->defaultStaticElementHelper);
        }

        if (!$this->staticElementHelper instanceof FormStatic) {
            $this->staticElementHelper = new FormStatic();
            $this->staticElementHelper->setView($renderer);
        }

        return $this->staticElementHelper;
    }
584014
public static function translator()
    {
        if (!isset(self::core()->translator)) {
            //====================================================================//
            // Initialize Tasks List
            self::core()->translator = new Translator();
        }

        return self::core()->translator;
    }
995806
public function helptext($name)
    {
        $path = $this->path.'.helptexts.'.$name;

        return $this->translator->get($path, '');
    }
562747
public function getTranslationFile()
    {
        $returnValue = null;

        
    	if ($this->translationFile != null) {
        	return $this->translationFile;
        }
        else {
        	throw new tao_helpers_translation_TranslationException('No TranslationFile to retrieve.');
        }
        

        return $returnValue;
    }
1132000
public function getParser()
    {
        if (!$this->parser) {
            $this->setParser(Injector::inst()->get('SilverStripe\\View\\SSTemplateParser'));
        }
        return $this->parser;
    }
229472
public function getQuestionHelper()
    {
        if (null == $this->questionHelper) {
            $this->setQuestionHelper($this->getCommand()->getHelper('question'));
        }
        return $this->questionHelper;
    }
834535
public function getActiveTranslateObject()
    {
        $adapter = $this->getTranslatorAdapter($this->getActiveContext());
        if (is_object($adapter)) {
            return $adapter->getTranslator();
        }

        return null;
    }
428532
protected function getFormMessagesHelper()
    {
        if ($this->formMessagesHelper) {
            return $this->formMessagesHelper;
        }

        if (method_exists($this->view, 'plugin')) {
            $this->formMessagesHelper = $this->view->plugin($this->defaultFormMessagesHelper);
        }

        if (!$this->formMessagesHelper instanceof AbstractHelper) {
            // @todo Ideally the helper should implement an interface.
            throw InvalidHelperException::invalidHelperInstance($this->formMessagesHelper);
        }

        return $this->formMessagesHelper;
    }
1278555
public function translations()
    {
        $model = '\\'.get_class($this);

        if (isset($this->translatable))
        {
            return $model::where('translation_of', $this->id)->get();
        }

        return collect();
    }
1149543
public function getTemplateHelper()
    {
        if ($this->templateHelper) {
            if (is_string($this->templateHelper)) {
                return Injector::inst()->get($this->templateHelper);
            }

            return $this->templateHelper;
        }

        return FormTemplateHelper::singleton();
    }
290338
public function getLang(): ?Translator
    {
        if (!$this->hasLang()) {
            $this->setLang($this->getDefaultLang());
        }
        return $this->lang;
    }
556871
public function getTranslator()
    {
        if ($this->translatorIsDisabled()) {
            return null;
        }

        if (null === $this->_translator) {
            return self::getDefaultTranslator();
        }

        return $this->_translator;
    }
742092
protected function getQuestionHelper(): QuestionHelper
    {
        if ($this->questionHelper === null) {
            $this->questionHelper = new QuestionHelper();
            $helperSet = new HelperSet([new FormatterHelper()]);
            $this->questionHelper->setHelperSet($helperSet);
        }
        return $this->questionHelper;
    }
1223110
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;
    }
1220210
public function translation()
    {
        if (is_null($this->translationsClass))
            $this->translationsClass = get_class($this) . 'Translations';

        return $this->hasOne($this->translationsClass, 'record_id', 'id')->where('language_code', app()->getLocale());
    }