Example #1
0
 /**
  * Fetch the output for a template
  * 
  * Includes layout if $_useLayout is set to \c true.
  * 
  * @param string $templateName
  *      The template name to fetch
  * @return string
  *      The output of the template
  */
 private function _fetchTemplate($templateName)
 {
     $actionOutput = $this->_template->fetch($templateName);
     if ($this->_useLayout && $this->_template->templateExists(self::LAYOUT_TEMPLATE)) {
         $this->_template->assign('action_content', $actionOutput);
         return $this->_template->fetch(self::LAYOUT_TEMPLATE);
     } else {
         return $actionOutput;
     }
 }