本文整理匯總了PHP中JModuleHelper::moduleCache方法的典型用法代碼示例。如果您正苦於以下問題:PHP JModuleHelper::moduleCache方法的具體用法?PHP JModuleHelper::moduleCache怎麽用?PHP JModuleHelper::moduleCache使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類JModuleHelper
的用法示例。
在下文中一共展示了JModuleHelper::moduleCache方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: defined
<?php
/**
* @package Joomla.Site
* @subpackage mod_tags_popular
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
// Include the tags_popular functions only once
require_once __DIR__ . '/helper.php';
$cacheparams = new stdClass();
$cacheparams->cachemode = 'safeuri';
$cacheparams->class = 'ModTagsPopularHelper';
$cacheparams->method = 'getList';
$cacheparams->methodparams = $params;
$cacheparams->modeparams = array('id' => 'array', 'Itemid' => 'int');
$list = JModuleHelper::moduleCache($module, $params, $cacheparams);
if (!count($list) && !$params->get('no_results_text')) {
return;
}
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'), ENT_COMPAT, 'UTF-8');
$display_count = $params->get('display_count', 0);
require JModuleHelper::getLayoutPath('mod_tags_popular', $params->get('layout', 'default'));
示例2: defined
/**
* @version CVS: 1.0.2
* @package com_akrecipes
* @subpackage mod_akrecipes
* @author Rutvik Doshi <rutvik@archanaskitchen.com>
* @copyright Copyright (C) 2015. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
// Include the syndicate functions only once
require_once __DIR__ . '/helper.php';
//$doc = JFactory::getDocument();
/* */
//$doc->addStyleSheet(JURI::base() . '/media/mod_akrecipes_recipes/css/style.css');
//$doc->addStyleSheet('media/com_akrecipes/css/mod_akrecipes_akrecipe.css');
/* */
//$doc->addScript(JURI::base() . '/media/mod_akrecipes_recipes/js/script.js');
$cacheparams = new stdClass();
$cacheparams->cachemode = 'id';
$cacheparams->class = 'ModAkrecipesrecipesHelper';
$cacheparams->method = 'getList';
$cacheparams->methodparams = $params;
$cacheid = md5(serialize(array($module->module, $module->id)));
$cacheparams->modeparams = $cacheid;
$recipes = JModuleHelper::moduleCache($module, $params, $cacheparams);
if (!count($recipes)) {
error_log(" ModAkrecipesrecipes NO RECIPES. returning");
return;
}
require JModuleHelper::getLayoutPath('mod_akrecipes_recipes', $params->get('layout', 'default'));
示例3: defined
<?php
/**
* @version CVS: 1.0.2
* @package com_akrecipes
* @subpackage mod_akrecipes
* @author Rutvik Doshi <rutvik@archanaskitchen.com>
* @copyright Copyright (C) 2015. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
// Include the syndicate functions only once
require_once __DIR__ . '/helper.php';
$doc = JFactory::getDocument();
$cacheparams = new stdClass();
$cacheparams->cachemode = 'id';
$cacheparams->class = 'ModAkrecipesfeaturedusersHelper';
$cacheparams->method = 'getList';
$cacheparams->methodparams = $params;
$cacheid = md5(serialize(array($module->module, $module->id)));
$cacheparams->modeparams = $cacheid;
$users = JModuleHelper::moduleCache($module, $params, $cacheparams);
if (!count($users)) {
error_log(" ModAkrecipesfeaturedusersHelper NO Users. returning");
return;
}
// error_log("Layout == " . $params->get('layout','default'));
// error_log("Layout Path == " . JModuleHelper::getLayoutPath('mod_akrecipes_featured_users', $params->get('layout', 'default')) );
require JModuleHelper::getLayoutPath('mod_akrecipes_featured_users', $params->get('layout', 'default'));
示例4: defined
<?php
/**
* @package HerrnhuterLosungen
* @author Thomas Hunziker <admin@sermonspeaker.net>
* @copyright (C) 2015 - Thomas Hunziker
* @license http://www.gnu.org/licenses/gpl.html
**/
defined('_JEXEC') or die;
require_once __DIR__ . '/helper.php';
$document = JFactory::getDocument();
$date = JFactory::getDate();
$cacheparams = new stdClass();
$cacheparams->cachemode = 'id';
$cacheparams->class = 'ModHerrnhuterlosungenHelper';
$cacheparams->method = 'getLosung';
$cacheparams->methodparams = $params;
$cacheparams->modeparams = $date->format('Y-m-d');
$losung = JModuleHelper::moduleCache($module, $params, $cacheparams);
if (!$losung) {
echo JText::_('MOD_HERRNHUTER_LOSUNGEN_NO_FILE_FOUND');
return;
}
$moduleclass_sfx = htmlspecialchars($params->get('moduleclass_sfx'));
require JModuleHelper::getLayoutPath('mod_herrnhuter_losungen', $params->get('layout', 'default'));