當前位置: 首頁>>代碼示例>>PHP>>正文


PHP JModuleHelper::moduleCache方法代碼示例

本文整理匯總了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'));
開發者ID:adjaika,項目名稱:J3Base,代碼行數:25,代碼來源:mod_tags_popular.php

示例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'));
開發者ID:rutvikd,項目名稱:ak-recipes,代碼行數:30,代碼來源:mod_akrecipes_recipes.php

示例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'));
開發者ID:rutvikd,項目名稱:ak-recipes,代碼行數:29,代碼來源:mod_akrecipes_featured_users.php

示例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'));
開發者ID:Bakual,項目名稱:Losungen,代碼行數:25,代碼來源:mod_herrnhuter_losungen.php


注:本文中的JModuleHelper::moduleCache方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。