/** * Returns an instance of class (singleton pattern implementation). * * @return UHEADER_BOL_TemplateDao */ public static function getInstance() { if (self::$classInstance === null) { self::$classInstance = new self(); } return self::$classInstance; }
public function deleteTemplateById($templateId) { $template = $this->findTemplateById($templateId); $this->templateRoleDao->deleteByTemplateId($templateId); $this->templateDao->deleteById($templateId); $this->deleteCoversByTemplateId($templateId); $tplPath = $this->getTemplatePath($template); OW::getStorage()->removeFile($tplPath); }