20 $this->mRoot->mDelegateManager->add(
'Legacy_ModuleInstallAction.InstallSuccess', [$this,
'cacheClear']);
21 $this->mRoot->mDelegateManager->add(
'Legacy_ModuleUpdateAction.UpdateSuccess', [$this,
'cacheClear']);
22 $this->mRoot->mDelegateManager->add(
'Legacy_ModuleUninstaller._fireNotifyUninstallTemplateBegun', [$this,
'cacheClear']);
25 public function cacheClear(&$module)
27 $handler =& xoops_getmodulehandler(
'tplfile',
'legacyRender');
29 $criteria =
new Criteria(
'tpl_module', $module->get(
'dirname'));
30 $tplfileArr = $handler->getObjects($criteria);
33 foreach (array_keys($tplfileArr) as $key) {
34 $xoopsTpl->clear_cache(
'db:' . $tplfileArr[$key]->
get(
'tpl_file'));
35 $xoopsTpl->clear_compiled_tpl(
'db:' . $tplfileArr[$key]->
get(
'tpl_file'));