getTemplate() public method

public getTemplate ( $p_templateIdOrName = null )
 /**
  * Get template
  *
  * @return MetaTemplate
  */
 private function _getTemplate()
 {
     $templateId = CampRequest::GetVar(CampRequest::TEMPLATE_ID);
     $themePath = $this->m_issue->defined() ? $this->m_issue->theme_path : $this->m_publication->theme_path;
     $template = new MetaTemplate(parent::getTemplate($templateId), $themePath);
     if (!$template->defined()) {
         throw new InvalidArgumentException("Invalid template in URL or no default template specified.", self::INVALID_TEMPLATE);
     }
     CampTemplate::singleton()->config_dir = APPLICATION_PATH . '/../themes/' . $themePath . '_conf';
     return $template;
 }
Esempio n. 2
0
 /**
  * Get template
  *
  * @return MetaTemplate
  */
 private function _getTemplate()
 {
     $templateId = CampRequest::GetVar(CampRequest::TEMPLATE_ID);
     $themePath = $this->m_issue->defined() ? $this->m_issue->theme_path : $this->m_publication->theme_path;
     $template = new MetaTemplate(parent::getTemplate($templateId), $themePath);
     if (!$template->defined()) {
         throw new InvalidArgumentException("Invalid template in URL or no default template specified.", self::INVALID_TEMPLATE);
     }
     return $template;
 }