<?php
namespace App\Mvc;

abstract class View_Iframe_GeneralAbstract extends \App\Mvc\ViewAbstract
{
	/**
	 * The smarty tempalte file (with path).
	 * @var String
	 */
	protected $renderingTemplate=SMARTY_LAYOUT_MAIN_IFRAME;

	/**
	 * Get template path
	 * @return string
	 */
	public function getTemplatePath()
	{
		return APP_REAL_PATH.$this->controller->getModulePath().'View/_tpl/'.$this->controller->getAction().'.tpl';
	}

	/**
	 * It also attempts to draw (using the MessageStack) the messages collected into $this->messagesCollector.
	 * @see \App\Mvc\ViewAbstract::render()
	 */
	public function render()
	{
		\Theme::getInstance()->stdModuleSmartyAssign($this);

		return $this->renderWithCustomTemplate($this->getTemplatePath(), $this->messagesCollector);
	}
}
