public function template_has_license($templateName = null) { if (is_null($templateName)) { $templateName = $_GET['template_name']; } if (empty($templateName)) { echo 0; return; } if (false == class_exists('\\template_manager\\classes\\Template')) { echo 0; return; } $template = new \template_manager\classes\Template($templateName); $license = $template->getLicenseAgreement(); echo empty($license) ? 0 : 1; }
/** * Get componeet object * @param type $handler - component class name * @return TComponent */ public function getComponent($handler) { $template = new \template_manager\classes\Template($this->templateName); return $template->getComponent($handler); }