本文整理匯總了PHP中JModuleHelper::getModuleList方法的典型用法代碼示例。如果您正苦於以下問題:PHP JModuleHelper::getModuleList方法的具體用法?PHP JModuleHelper::getModuleList怎麽用?PHP JModuleHelper::getModuleList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類JModuleHelper
的用法示例。
在下文中一共展示了JModuleHelper::getModuleList方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: loadElementAssets
private static function loadElementAssets()
{
//BEGIN compress
$app = JFactory::getApplication();
$doc = JFactory::getDocument();
// Require base shorcode element
self::requireBaseShortCodeElement();
$JSNPbElements = new JSNPagebuilderHelpersElements();
if ($doc instanceof JDocumentHTML) {
$content = $doc->getBuffer('component');
$modules = JModuleHelper::getModuleList();
if (count($modules)) {
foreach ($modules as $module) {
if (trim($module->content) != '') {
$content .= $module->content;
}
}
}
$content = str_replace('$', '$', $content);
$helper = new JSNPagebuilderHelpersBuilder();
$elementClass = $helper->getShortCodeClassBeforeRender($content);
if (!$app->isAdmin()) {
JHtml::_('jquery.framework');
$doc->addScript(JSNPB_PLG_SYSTEM_ASSETS_URL . 'js/joomlashine.noconflict.js', 'text/javascript');
$doc->addScript(JSNPB_PLG_SYSTEM_ASSETS_URL . '3rd-party/bootstrap3/js/bootstrap.min.js', 'text/javascript');
//$doc->addScript( JSNPB_PLG_SYSTEM_ASSETS_URL . '3rd-party/scrollreveal/scrollReveal.js', 'text/javascript' );
$doc->addStyleSheet(JSNPB_PLG_SYSTEM_ASSETS_URL . '3rd-party/bootstrap3/css/bootstrap.min.css', 'text/css');
$doc->addStyleSheet(JSNPB_PLG_SYSTEM_ASSETS_URL . 'css/pagebuilder.css', 'text/css');
$doc->addStyleSheet(JSNPB_PLG_SYSTEM_ASSETS_URL . 'css/jsn-gui-frontend.css', 'text/css');
$doc->addStyleSheet(JSNPB_PLG_SYSTEM_ASSETS_URL . 'css/front_end.css', 'text/css');
$doc->addStyleSheet(JSNPB_PLG_SYSTEM_ASSETS_URL . 'css/front_end_responsive.css', 'text/css');
}
if (is_array($elementClass) && count($elementClass) > 0) {
foreach ($elementClass as $class) {
$instance = new $class();
if (method_exists($instance, 'load_assets_frontend')) {
$instance->load_assets_frontend();
}
}
}
}
}
示例2: foreach
protected function &getModuleList()
{
if ($this->modules === null) {
$modules = \JModuleHelper::getModuleList();
$this->modules = [];
foreach ($modules as $module) {
$this->modules[$module->id] = $module;
}
}
return $this->modules;
}
示例3: defined
<?php
/**
* @package Alligo.Modules
* @subpackage mod_banners4varnish
*
* @copyright Copyright (C) 2005 - 2015 Alligo Ltda. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$modules = JModuleHelper::getModuleList();
$id_modulo = null;
foreach ($modules as $module) {
if ($module->module === 'mod_banners4varnish') {
if ($module->params) {
$registry = new JRegistry();
$module_params = $registry->loadString($module->params);
// Esse modulo não recebe ID de uma forma amigável. Infelismente, é necessário
// descobrir por força quase bruta
if ($module_params['catid'] === $params['catid'] && $module_params['ordering'] === $params['ordering'] && $module_params['header_text'] === $params['header_text'] && $module_params['footer_text'] === $params['footer_text'] && $module_params['moduleclass_sfx'] === $params['moduleclass_sfx']) {
$id_modulo = $module->id;
break;
}
}
}
}
if (!empty($id_modulo)) {
?>
<div class="banner-ajax" id="banner-ajax<?php
echo $id_modulo;
?>