Register spamfilter, tag, widget module triggers in module.xml

This commit is contained in:
Kijin Sung 2023-10-02 22:48:23 +09:00
parent ad1241fbb5
commit e81d0500eb
6 changed files with 43 additions and 158 deletions

View file

@ -10,47 +10,27 @@ class widget extends ModuleObject
/**
* @brief Implement if additional tasks are necessary when installing
*/
function moduleInstall()
public function moduleInstall()
{
// Create cache directory used by widget
FileHandler::makeDir('./files/cache/widget');
FileHandler::makeDir('./files/cache/widget_cache');
// Add this widget compile the trigger for the display.after
$oModuleController = getController('module');
$oModuleController->insertTrigger('display', 'widget', 'controller', 'triggerWidgetCompile', 'before');
}
/**
* @brief a method to check if successfully installed
*/
function checkUpdate()
public function checkUpdate()
{
$oModuleModel = getModel('module');
// widget compile display.after trigger for further (04/14/2009)
if(!$oModuleModel->getTrigger('display', 'widget', 'controller', 'triggerWidgetCompile', 'before')) return true;
return false;
}
/**
* @brief Execute update
*/
function moduleUpdate()
public function moduleUpdate()
{
$oModuleModel = getModel('module');
$oModuleController = getController('module');
// widget compile display.after trigger for further (04/14/2009)
if(!$oModuleModel->getTrigger('display', 'widget', 'controller', 'triggerWidgetCompile', 'before'))
{
$oModuleController->insertTrigger('display', 'widget', 'controller', 'triggerWidgetCompile', 'before');
}
}
/**
* @brief Re-generate the cache file
*/
function recompileCache()
{
}
}
/* End of file widget.class.php */