XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
widget.class.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) NAVER <http://www.navercorp.com> */
8 class widget extends ModuleObject
9 {
13  function moduleInstall()
14  {
15  // Create cache directory used by widget
16  FileHandler::makeDir('./files/cache/widget');
17  FileHandler::makeDir('./files/cache/widget_cache');
18  // Add this widget compile the trigger for the display.after
20  $oModuleController->insertTrigger('display', 'widget', 'controller', 'triggerWidgetCompile', 'before');
21 
22  return new BaseObject();
23  }
24 
28  function checkUpdate()
29  {
30  $oModuleModel = getModel('module');
32  $version_update_id = implode('.', array(__CLASS__, __XE_VERSION__, 'updated'));
33  if($oModuleModel->needUpdate($version_update_id))
34  {
35  // widget compile display.after trigger for further (04/14/2009)
36  if(!$oModuleModel->getTrigger('display', 'widget', 'controller', 'triggerWidgetCompile', 'before')) return true;
37 
38  $oModuleController->insertUpdatedLog($version_update_id);
39  }
40 
41  return false;
42  }
43 
47  function moduleUpdate()
48  {
49  $oModuleModel = getModel('module');
51  $version_update_id = implode('.', array(__CLASS__, __XE_VERSION__, 'updated'));
52  if($oModuleModel->needUpdate($version_update_id))
53  {
54  // widget compile display.after trigger for further (04/14/2009)
55  if(!$oModuleModel->getTrigger('display', 'widget', 'controller', 'triggerWidgetCompile', 'before'))
56  {
57  $oModuleController->insertTrigger('display', 'widget', 'controller', 'triggerWidgetCompile', 'before');
58  }
59 
60  $oModuleController->insertUpdatedLog($version_update_id);
61  }
62 
63  return new BaseObject(0, 'success_updated');
64  }
65 
69  function recompileCache()
70  {
71  }
72 }
73 /* End of file widget.class.php */
74 /* Location: ./modules/widget/widget.class.php */
$oModuleModel
Definition: ko.install.php:236
getController($module_name)
Definition: func.inc.php:90
recompileCache()
Re-generate the cache file.
const __XE_VERSION__
Definition: config.inc.php:32
moduleInstall()
Implement if additional tasks are necessary when installing.
widget module&#39;s high class
Definition: widget.class.php:8
checkUpdate()
a method to check if successfully installed
makeDir($path_string)
getModel($module_name)
Definition: func.inc.php:145
moduleUpdate()
Execute update.
$oModuleController
Definition: ko.install.php:287