mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0_english@8278 201d5d3c-b55e-5fd7-737f-ddc643e51545
60 lines
2.1 KiB
PHP
60 lines
2.1 KiB
PHP
<?php
|
|
/**
|
|
* @class widget
|
|
* @author NHN (developers@xpressengine.com)
|
|
* @brief widget module's high class
|
|
**/
|
|
|
|
class widget extends ModuleObject {
|
|
|
|
/**
|
|
* @brief Implement if additional tasks are necessary when installing
|
|
**/
|
|
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');
|
|
|
|
return new Object();
|
|
}
|
|
|
|
/**
|
|
* @brief a method to check if successfully installed
|
|
**/
|
|
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() {
|
|
$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');
|
|
}
|
|
|
|
return new Object(0, 'success_updated');
|
|
}
|
|
|
|
/**
|
|
* @brief Re-generate the cache file
|
|
**/
|
|
function recompileCache() {
|
|
// delete the cache files containing information widget
|
|
FileHandler::removeFilesInDir("./files/cache/widget");
|
|
// delete the cache files created widget
|
|
FileHandler::removeFilesInDir("./files/cache/widget_cache");
|
|
}
|
|
|
|
}
|
|
?>
|