コード例 #1
0
 public function loadConfig($params, $modulename = "mod_janewspro")
 {
     global $mainframe;
     $use_cache = $mainframe->getCfg("caching");
     $this->mod_params = $params;
     if ($params->get('cache') == "1" && $use_cache == "1") {
         $cache =& JFactory::getCache();
         $cache->setCaching(true);
         $cache->setLifeTime($params->get('cache_time', 30) * 60);
         $this->_params = $cache->get(array(new modJaNewsProHelper(), 'loadProfile'), array($params, $modulename));
     } else {
         $this->_params = modJaNewsProHelper::loadProfile($params, $modulename);
     }
 }
コード例 #2
0
ファイル: helper.php プロジェクト: ashanrupasinghe/slbcv2
 /**
  *
  * Load config of JA News Pro Module
  * @param object $params
  * @param string $modulename
  * @return object Config of JA News Pro Module
  */
 public function loadConfig($params, $modulename = "mod_janewspro")
 {
     $mainframe = JFactory::getApplication();
     $use_cache = $mainframe->getCfg("caching");
     $this->mod_params = $params;
     $this->_params = modJaNewsProHelper::loadProfile($params, $modulename);
 }