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