Return the email view.

@return ComMailerViewTemplate
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;
    }
758929
public function show()
    {
        return View::make($this->viewPrefix."location.$this->template", [
            'lat'      => $this->getLat(),
            'lng'      => $this->getLng(),
            'address'  => $this->getAddress(),
            'title'    => $this->getTitle(),
            'postcode' => $this->getPostcode(),
            'location' => $this->getLocation(),
        ]);
    }
896379
public function getTemplates()
    {
        $templates = SSViewer::get_templates_by_class($this, '', __CLASS__);
        // Prefer any custom template
        if ($this->getTemplate()) {
            array_unshift($templates, $this->getTemplate());
        }
        return $templates;
    }
64322
public function getView()
    {
        if (!empty($this->view)) {
            return $this->view;
        }

        $class = explode('\\', get_called_class());

        return 'merchant::form.'.strtolower(end($class));
    }
413787
public function getTemplateDir()
    {
        if (($sValue = $this->getViewConfigParam('templatedir')) === null) {
            $sValue = $this->getConfig()->getTemplateDir($this->isAdmin());
            $this->setViewConfigParam('templatedir', $sValue);
        }

        return $sValue;
    }
928864
public function render() 
	{	
		$message = $this->message;
		
		reset( $this->to );
		
		// default view parameters for the message and the layout
		$params = array(
			'mail' => $this,
			'to_email' => key($this->to),
			'to_name' => $this->to[ key($this->to) ],
		);
		
		// if the message is a view
		if ( $message instanceof \CCView ) 
		{	
			$message->_data = $message->_data + $params;
			$message = $message->render();
		}
		
		// prepare the layout
		if ( $this->layout ) 
		{
			$this->layout->content = $message;
			$this->layout->_data = $this->layout->_data + $params;
			
			$message = $this->layout->render();
		}
		
		// return the renderd message
		return $message;
	}
1041310
public function getContent()
    {
        if (is_null($this->view)) {
            throw new RuntimeException('No view was set for the ViewResponse object.');
        }
        return $this->template->render($this->view, $this->viewdata);
    }
257650
protected function _getViewObject() {
        if (!Zend_Registry::isRegistered('application')) {
            throw new Exception('Application is not registered.');
        }

        $bootstrap = Zend_Registry::get('application')->getBootstrap();
        $view = $bootstrap->getResource('View');

        // Unfortunately specific conditional required when using the Ano_ZFTwig package.
        // This switches the rendering engine from twig to php, since the Spawn templates are still
        // in php.
        if ($view instanceof Ano_View) {
            $view->setTemplateEngine('php');
        }
        return $view;
    }
876438
public function showTemplates()
		{
			$form_data = array(
				'headers' => 1
			);
			$data = $this->call('show_templates', $form_data, 'csv');
			$csv = new \parseCSV($data);

			$templates = array();

			foreach ($csv->data as $template_item) {
				$template = new Template;
				$template
					->setTemplateId((int)$template_item['Template Number'])
					->setName((string)$template_item['Template Name'])
					->setFolderId((int)$template_item['Folder ID']);
				$templates[] = $template;
			}

			return $templates;
		}
1349173
public function getTemplate()
    {
        if (is_null($this->_template)) {
            Template::appendPath(dirname(__FILE__).'/Views');
            $temp = new Template();
            $this->_template = $temp->initialize();
        }
        return $this->_template;
    }
690395
public function getTemplate()
    {
        if (null === $this->template) {
            $this->template = $this->getTemplatePathDefault('layout');
        }

        return $this->template;
    }
383018
public function getView()
    {
        if (!$this->_view instanceof LibBaseViewAbstract) {
            //Make sure we have a view identifier
            if (!($this->_view instanceof AnServiceIdentifier)) {
                $this->setView($this->_view);
            }

            //Create the view
            $config = array(
                'media_url' => AnRequest::root().'/media',
                'base_url' => AnRequest::url()->getUrl(AnHttpUrl::BASE),
                'state' => $this->getState(),
            );

            if ($this->_request->has('layout')) {
                $config['layout'] = $this->_request->get('layout');
            }

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

        return $this->_view;
    }
1211732
private function getEmailHtml()
    {
        return $this->app['twig']->render(
            'email/pingtest.twig',
            [
                'sitename' => $this->app['config']->get('general/sitename'),
                'user'     => $this->options['user']['displayname'],
                'ip'       => $this->options['ip'],
            ]
        );
    }
1126842
public function getDefaultTemplate() {
        if ($this->_defaultTemplate) return $this->_defaultTemplate;
        
        if ($this->template) 
            $this->_defaultTemplate = $this->template;
            else $this->_defaultTemplate = DEFAULT_TEMPLATE;
            
        return $this->_defaultTemplate;
    }
344501
protected function getWrappedTemplate()
	{
		$this->attributes['style']['width']    = '100%';
		$this->attributes['style']['height']   = '100%';
		$this->attributes['style']['position'] = 'absolute';
		$this->attributes['style']['left']     = '0';

		$outerStyle = 'display:inline-block;width:100%;max-width:' . $this->attributes['width'] . 'px';
		$innerStyle = 'display:block;overflow:hidden;position:relative;' . $this->getResponsivePadding();

		$template  = '<span>' . $this->generateAttributes(['style' => $outerStyle]);
		$template .= '<span>' . $this->generateAttributes(['style' => $innerStyle]);
		$template .= $this->getContentTemplate();
		$template .= '</span></span>';

		return $template;
	}
29043
protected function getEmail(): AbstractMailAdapter
    {
        if (isset($this->config[self::FN_CONFIG_KEY])) {
            $mail = call_user_func($this->config[self::FN_CONFIG_KEY], $this->messages);

            if (!($mail instanceof AbstractMailAdapter)) {
                throw new Exception('Function defined in mail config under ' . self::FN_CONFIG_KEY . ' must return instance of \Koldy\Mail\Adapter\AbstractMailAdapter; ' . gettype($mail) . ' given');
            }

            return $mail;
        }

        if (count($this->messages) == 0) {
            throw new Exception('Can not prepare e-mail instance when there\'s no log messages added from before; try not to call getEmail() if messages array is empty');
        }

        $mail = Mail::create($this->config['adapter']);
        $allMessages = [];
        $firstMessage = $this->messages[0];

        foreach ($this->messages as $msg) {
            $allMessages[] = $msg->getDefaultLine();
        }

        $body = implode("\n", $allMessages);

        $level = strtoupper($firstMessage->getLevel());
        $subject = "[{$level}] {$firstMessage->getMessage()}";

        $body .= "\n\n----------\n";
        $body .= Server::signature();
        $subject = Util::truncate($subject, 140);
        $domain = Application::getDomain();

        $mail->from('alert@' . $domain, $domain)->subject($subject)->body($body);

        $to = $this->config['to'];
        if (!is_array($this->config['to']) && strpos($this->config['to'], ',') !== false) {
            $to = explode(',', $this->config['to']);
        }

        if (is_array($to)) {
            foreach ($to as $toEmail) {
                $mail->to(trim($toEmail));
            }
        } else if (is_string($to)) {
            $mail->to(trim($to));
        } else {
            throw new Exception('Unable to prepare log via email, expected array or string for \'to\', got ' . gettype($to));
        }

        return $mail;
    }
591287
protected function _getTemplate()
    {
        if (is_null($this->_template)) {
            foreach ($this->_map as $method => $className) {
                if ($this->_sql instanceof $className) {
                    $this->_template = $this->$method();
                    break;
                }
            }
        }
        return $this->_template;
    }