Get the templater.

@return MailTemplaterInterface
180802
protected function getTemplater()
    {
        if (null !== $this->container) {
            $this->templater = $this->container->get('fxp_mailer.mail_templater');
            $this->container = null;
        }

        return $this->templater;
    }
1177915
public function getMailer() {
		if ($this->mailer === null) {
			$prefs = $this->getPreferenceLoader()->getSystemPreferences();
			switch ($prefs->getMailTransport()) {
				case SystemPreferences::MAIL_TRANSPORT_SMTP:
					$transport = new Swift_SmtpTransport($prefs->getSmtpServer(), $prefs->getSmtpPort());
					$transport->setUsername($prefs->getSmtpUsername());
					$transport->setPassword($prefs->getSmtpPassword());
					$encryption = $prefs->getSmtpEncryption();
					if ($encryption != SystemPreferences::SMTP_ENCRYPTION_NONE) {
						$transport->setEncryption($encryption);
					}
					break;

				case SystemPreferences::MAIL_TRANSPORT_SENDMAIL:
					$transport = new Swift_SendmailTransport($prefs->getSendmail());
					break;

				case SystemPreferences::MAIL_TRANSPORT_MAIL:
				default:
					$transport = new Swift_MailTransport();
					break;
			}

			$this->mailer = new Swift_Mailer($transport);
		}

		return $this->mailer;
	}
575920
public function getTemplate()
    {
        if (! $this->_template instanceof LibBaseTemplateAbstract) {
            //Make sure we have a template identifier
            if (! ($this->_template instanceof AnServiceIdentifier)) {
                $this->setTemplate($this->_template);
            }

            $config = array(
                'view' => $this
            );

            $this->_template = $this->getService($this->_template, $config);
        }

        return $this->_template;
    }
278211
public function template() {

		if ( is_null( $this->template ) ) {
			$this->template = $this->locate();
		}

		return $this->template;
	}
1122849
protected function getTemplatePath()
    {
        if (!isset($this->templatePath)) {
            $this->templatePath = self::$config->templates[$this->template] . '/' . $this->name;
        }

        return $this->templatePath;
    }
413787
public function getTemplateDir()
    {
        if (($sValue = $this->getViewConfigParam('templatedir')) === null) {
            $sValue = $this->getConfig()->getTemplateDir($this->isAdmin());
            $this->setViewConfigParam('templatedir', $sValue);
        }

        return $sValue;
    }
875638
public function getTemplate()
    {
        if (!$this->_template instanceof KTemplateInterface)
        {
            //Make sure we have a template identifier
            if (!($this->_template instanceof KObjectIdentifier)) {
                $this->setTemplate($this->_template);
            }

            $options = array(
                'filters'   => $this->getConfig()->template_filters,
                'functions' => $this->getConfig()->template_functions,
            );

            $this->_template = $this->getObject($this->_template, $options);

            if(!$this->_template instanceof KTemplateInterface)
            {
                throw new UnexpectedValueException(
                    'Template: '.get_class($this->_template).' does not implement KTemplateInterface'
                );
            }
        }

        return $this->_template;
    }
269971
public function processTemplate()
    {
        // Support theme fallback for email templates
        $isDesignApplied = $this->applyDesignConfig();

        $processor = $this->getTemplateFilter()
            ->setUseSessionInUrl(false)
            ->setPlainTemplateMode($this->isPlain())
            ->setIsChildTemplate($this->isChildTemplate())
            ->setTemplateProcessor([$this, 'getTemplateContent']);

        $processor->setVariables($this->getVariables());
        $this->setUseAbsoluteLinks(true);
        $html = $this->html($processor);

        if ($isDesignApplied) {
            $this->cancelDesignConfig();
        }

        return $html;
    }
714628
public function getListTemplate()
    {
        if (null === $this->listTemplate) {
            $template = rtrim($this->getTemplatePrefix(), '/') . '/' . $this->getListSuffix();
            $this->setListTemplate($template);
        }

        return $this->listTemplate;
    }
699152
private function getTemplate()
    {
        if ($this->template) {
            return $this->template;
        }

        return $this->template = $this->twig->load('@EkynaCms/Editor/Block/tabs.html.twig');
    }
166364
public static function listAllTemplates()
    {
        $fileTemplates = (array) MailManager::instance()->listRegisteredTemplates();
        $dbTemplates = (array) self::lists('code', 'code');
        $templates = $fileTemplates + $dbTemplates;
        ksort($templates);
        return $templates;
    }
1028360
public function getMailTemplate()
    {
        $chunks = explode('\\', get_class($this));
        $className = array_pop($chunks);

        return [
            uncamelcase($className),
            'community_translation',
        ];
    }
769052
public function getEmailTemplateView()
    {
        if (! $this->_template_view instanceof LibBaseViewTemplate) {

            if (!isset($this->_template_view)) {
                $this->_template_view = clone $this->_mixer->getIdentifier();
                $this->_template_view->path = array('emails');
                $this->_template_view->name = 'template';
            }

            $identifier = clone $this->_mixer->getIdentifier();
            $identifier->path = array('emails');

            $directory = dirname($identifier->filepath);
            if (strpos($directory, ANPATH_ROOT) === false) {
                $directory = ANPATH_ROOT.$directory;
            }

            $paths[] = $directory;
            $paths[] = implode(DS, array(ANPATH_THEMES, $this->getService('application')->getTemplate(), 'emails', $identifier->type.'_'.$identifier->package));
            $paths[] = implode(DS, array(ANPATH_THEMES, $this->getService('application')->getTemplate(), 'emails'));

            $config = array(
                'base_url' => $this->_base_url,
                'template_paths' => $paths,
            );

            register_default(array(
                'identifier' => $this->_template_view,
                'default' => 'LibBaseViewTemplate'
            ));

            $this->_template_view = $this->getService($this->_template_view, $config);
        }

        return $this->_template_view;
    }
521257
public function getTemplateAccessors() {
		if($this->templateAccessors) return $this->templateAccessors;

		$vars = parent::getTemplateAccessors();

		return $this->templateAccessors = array_merge($vars, array (
			'To',
			'Cc',
			'Bcc',
			'From',
			'Subject',
			'Body',
			'BaseURL',
			'IsEmail'
		));
	}
338550
public function getTemplate()
    {
        if (is_null($this->_template)) {
            $this->_template = new \Slick\Form\Template\SelectMultiple();
        }
        return $this->_template;
    }
1292933
public function getTemplateEngine()
    {
        if (null == $this->templateEngine) {
            $this->setTemplateEngine($this->getDefaultTemplateEngine());
        }

        return $this->templateEngine;
    }
794079
public function getPanel() {
		$template = new FileTemplate();
		$template->registerFilter(new Engine);
		$template->registerHelperLoader('Nette\\Templating\\Helpers::loader');
		$template->setFile(__DIR__ . '/MailPanel.latte');
		$template->baseUrl = $this->request->getUrl()->getBaseUrl();
		$template->messages = $this->mailer->getMessages($this->messagesLimit);

		return (string) $template;
	}