本文整理汇总了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'));